Looping a table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
therat
Forum Commoner
Posts: 62
Joined: Wed Oct 01, 2003 2:44 pm
Location: London

Looping a table

Post by therat »

I am trying to adapt the code in this post, found via the useful posts sticky, to the layout I need. I need to repeat the following table accross the page, the original code creats one table and repeats the cells. Could someone point me in the right direction, thanks

Code: Select all

<table width="25%" border="0" cellspacing="1" cellpadding="3" class="tablebg">
    <tr>
        <th>TITLE</th>
    </tr>
	<tr class="row2">
	    <td>by USER on 01.01.01</td>
    </tr>
	<tr class="row1">
	    <td align="center">IMAGE</td>
    </tr>
</table>
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Are you saying you want multiple tables drawn down the screen, or one table with the rows drawn down the screen? Or do you want something entirely different?
therat
Forum Commoner
Posts: 62
Joined: Wed Oct 01, 2003 2:44 pm
Location: London

Post by therat »

What I needed was that one table looped accross the page 4 times. I have managed to get what I need now, thanks for answering anyway
Post Reply