I would like to display the results of my MySQL query in a 3 column HTML table.
Basically the query pulls out the image and the associated link to each image. I would like to take these two bits of information and setup a 3 column table that would display a linked image in each cell and continue to the next row after reaching the 3rd column.
This is the method I normally use to loop through query results (I took this code from a different project I was working on):
print "<table width=\"100%\" cellspacing=\"3\" cellpadding=\"2\">";
print "<tr class=\"lightBG\">
<td nowrap class=\"header\">Date</td>
<td class=\"header\">Location</td>
</tr>";
while ($arrayRow = mysql_fetch_array($result))
{
print "<tr class=\"$bgColor\">";
print "<td nowrap align=\"right\" class=\"body\">";
print "$arrayRow[tourDate]<br>$arrayRow[tourTime]";
print "</td>";
print "<td valign=\"top\" class=\"body\">";
print "$arrayRow[city], $arrayRow[stateAbbrev] @ ";
print "</td>";
print "</tr>";
print "</table>";
Any help would be GREATLY appreciated.