Let me guess
You have a table that contains pictures. It has 4 pictures per row in a table and table has five rows and you are trying to retrieve all the pictures??? Am I correct.
If yes, then
This is how you can do it...
$result=mysql_query("You query...", $connection);
while($res=mysql_fetch_array($result))
{
echo "<tr><td>$res[field1]</td></td>$res[field2]</td>....</tr>";
}
mysql_fetch_array() retrives one row at a time and stores it into $res. name of fields in a table is a key to access data from $res, because result is an associative array.
If you have table with names picture1, picture2, and picture3. Then to access you do $res[picture1], etc...
Di