I show images that are stored in my DB.
See code below
$num_rows = mysql_num_rows($result41);
for ($i = 1; $i <= mysql_num_rows($result41); $i++)
{
$row = mysql_fetch_array($result41);
$upload_id = $row ['upload_id'];
$file = $row ['FILE_NAME'];
echo"
<td>
<a href='image.php?id=$upload_id&gallery=$id'><center>
<img src='uploads/$file' alt='$name Gallery' title='$name Album' class='resize'>
</td>";
}
if ($i % 0 == 4) {
echo '</tr>'; // it time to move to next row
}
My question is: after displaying 4 columns, how can I go to another row? (4 images per line)
I have it if ($i % 0 == 4)in my script but it doesn't seem to work?
thanks
Shaun source
share