I'm reading image urls from a MySQL database and I'd like to have these images display in 4 columns rather than one tall one. Here's what I've got so far but this just displays them in a single column:
<?
$query = "SELECT * FROM photos";
$result = mysql_query($query);
$max = mysql_num_rows($result);
echo "<table width='450'>";
echo "<tr>";
for($i=0; $i<$max; $i++){
while($rows = mysql_fetch_array($result)){
$image = $rows['url'];
echo "<td align='left' valign='top'>";
echo "<img src='".$image."' border='0'>";
echo "</td";
}
}
echo "</tr>";
echo "</table>";
?>