Hello all,
I am trying to show the results of a mysql query in a regular HTML table but using a bit of PHP to solve this one problem I have.
The table is three cells across, but I want the top right cell to be static HTML content.
Here is the code I have so far, although it won't give me that alternate cell content, as it is now....
What I want:
[result1][result2][CONTENT]
[result3][result4][result5]
[result6][result7][result8]
...etc...
$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>";
Anyone have any ideas of how to accomplish this?
Thanks in advance!