I'm trying to display my mysql query into a fairly unique table. The characteristics are as follows:
- The results table has 3 columns
- The top right cell is reserved for other content
[result1][result2][content]
[result3][result4][result5]
[result6][result7][result8]
...etc
The query can bring back as few as 1 result. But I'm struggling to get what i need included in the loop.
If anyone knows how to go after something like this, I'd love some help! Thanks in advance!
EDIT ** HERE IS MY CODE SO FAR
the results are coming through in three columns, but I can't get the condition to display other static content in the top right cell.
$row = 0;
$column = 0;
echo "<table>";
while($row = mysql_fetch_assoc($result)) {
if ($column == 0) {echo "<tr>";}
if (($column == 2) && ($row == 0)){echo "<td>content</td></tr><tr>";}
echo "<td>".$row['business']."</td>";
$column++;
if ($column >= 3) {
$row++;
echo "</tr>";
$column = 0;
}
}
echo "</table>";