Geting multiple rows
Posted: Tue Jun 08, 2004 1:37 pm
Im trying to get multiple rows from mysql and echo them out.
This works but i dont want all of the rows at once
when i try this for loop it doesnt work. It just prints out the first image 3 times?
Thanks Paul
?>
This works but i dont want all of the rows at once
Code: Select all
while($row = mysql_fetch_array($result))
{
extract ($row);
echo "<td width='500'><img src='images/$Name'></td>";
}Code: Select all
for($i = 1; $i <= 3; $i++)
{
extract ($row);
echo "<td width='500'><img src='images/$Name'></td>";
}?>