Hey, I'm trying to create a relatively simple photo thumbnail gallery. No GD or anything like that (yet, anyway), just pulling filenames from a database and putting the images into a table.
Currently I've got this:
The problem is I don't know how to make it so that it starts a new row every four columns. Anyone have any simple tips on how to make it start a new row every four thumbnails?
Thanks in advance.
Currently I've got this:
PHP Code:
<tr>
<? if ($img = mysql_fetch_array($image, MYSQL_ASSOC)) { ?>
<? do { ?>
<td><img src="<? echo $img[filename]?>"></td>
<? } while ($img = mysql_fetch_array($image, MYSQL_ASSOC));
} else {}
?>
</tr>
Thanks in advance.
Comment