I have the this code that will output the data from my database into a table:
$query= "SELECT * FROM picinfo WHERE catogry='$catogry'";
$result=mysql_query($query);
$num_results = mysql_numrows($result);
for ($i=0; $i < $num_results; $i++)
{
$row= mysql_fetch_array($result);
?>
<table border=1>
<tr>
<td>Picture Thumnail goes here
</tr>
<tr>
<td>Name: <?php echo $row['name']; ?>
</tr>
<tr>
<td>Last Modfied: <?php echo $row['date']; ?>
</tr>
<tr>
<td>Size: (thum) <?php echo $row['size'];?> kb, (Pic)
</tr>
</table>
<?
}
?>
This works fine, with record in a seperate table, aligned under each other. What I want to do is have 3 tables per line, then start a new line. I tried many way, eg nesting the loop inside another one, or testing the moduls of $i to see if its dividble by 3, but none worked.