This should help.. play around with it 😃
<table width="100" cellpadding="1" cellspacing="2" border="0" align="left">
<?
// Check for pictures
$count=0;
$next=1;
mysql_connect("$host", $db_user, $db_pass) or die ("DataBase connection error! Please try again later.");
$query="SELECT * FROM $table";
$result=mysql_db_query($db_name,$query);
while($row=mysql_fetch_array($result)) {
$pic_id=$row["pic_id"];
$url=$row["url"];
?>
<?
if ($next==1) {echo "<tr>"; $next=0;}
?>
<td align="left" valign="middle">
<a href="destination url" img src="<?="$url";?>" border=0 </a>
</td>
<?
if($count>2) // change this to allow more columns this should do 3
{
echo "</tr>";
$next=1;
$count=0;
} else
{
$count++;
}
}
?>
</table>
lemme know if it didnt help