[SOLVED] php echo table contents from dtabase
Posted: Wed Jan 27, 2010 1:15 pm
ok so i have a script which takes info from a sql databse and outputs it in a table but the problem is that my code only outputs the first result in the table and everything else outside of it. how can i make it so that it outputs it all in the table?
there are multiple entries in each row and only the first ones are put in the table
thanks
Code: Select all
while($row = mysql_fetch_array($result))
{
echo "<td>" . $row['row1'] . "</td>";
echo "<td>" . $row['row2'] . "</td>";
echo "<td>" . $row['row3'] . "</td>";
}thanks