I have the following working code. It displays 4 images per line, but will post an infinite number of photos on one page. How can I modify this code to put only 6 rows (24 photos) per page?
Thanks in advance,
Chris
<div class="center">
<table class="table01">
<?php
include 'connect.php';
$numInRow = 4;
$query = "SELECT * FROM mytable ORDER BY id DESC";
$result = mysql_query($query);
$num_rows=mysql_num_rows($result);
for ($i=0; $i<$num_rows; $i++){
if ($i % $numInRow == 0) { print ("<tr>"); }
// fetch row
$img_info = mysql_fetch_array($result);
// start table row
echo "<td><a href='imagelocation/$img_info[uniquename]' rel=\"lightbox[group]\" title=\"$img_info[name]\"><img src='imagelocation/$img_info[uniquename]'
style=\"border:1px solid #FFFFFF\" alt=\"$img_info[name]\" title=\"$img_info[name]\" width=\"150\" height=\"150\" /></a>
<br/><span style=\"font-size: 11px; line-height: 11px; \">$img_info[name]<br/> </span></td>";
if ($i % $numInRow == $numInRow-1) { print ("</tr>"); }
}
?>
<tr><td><br/></td></tr>
</table>
</div>