More brain farts
| From: | Brian V Bonini | Date: | Tue, 06 Aug 2002 15:52:06 +0000 |
| Subject: | More brain farts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111390@lists.php.net to get a copy of this message | ||
Another one of those thigns I've been staring at too long......
I need to get this to have a new row every 4th cell
<table>
<tr>
<?php
while($row = mysql_fetch_object($result)) {
$img = $row->image_name;
if ( ($row->id % 4) == 0) {
echo "<td><a href=\"/ss/images/$img\"><img
src=\"/ss/thumbnails/" . $img .
"\" />" . '</a></td>';
} else {
echo "<td><a href=\"/ss/images/$img\"><img
src=\"/ss/thumbnails/" . $img .
"\" />" . '</a></td>';
}
}
?>
</tr>
</table>
Not sure how to make it work, obviously what I have so far is not it... ;-)