Hi everyone,
Can anyone point me in the right direction please? 🙂
I want to output the results of a database query into a table - with a catch!
I'd like each result to have its own cell, and i'd like the table to be no more than 3 cells wide by total results / 3 rows high.
Here is my code, i'm struggling with this one!
[INDENT]echo '<table border="1">';
for ($cell_count=1; $cell_count <= 3; $cell_count++)
{
echo '<tr>';
for ($i=1; $i <= mysql_num_rows($result); $i++)
{
$row = mysql_fetch_array($result);
echo '<td>' . $row["file_location"] . '</td>';
}
echo '</tr>';
}
echo '</table>';[/INDENT][/COLOR]
I can't work out the logic of it!
Thanks for looking,
dai.hop