Use a while statment with fetch_object. Somthing like :
PHP Code:
<?
// do querys here, query = $result
// if records present
if (mysql_num_rows($result) > 0)
{
// iterate through resultset
// print whatever is needed.
while($row = mysql_fetch_object($result))
{
?>
Do whatever you want here, echo the result/s you want, with any HTML formating
<?
// close loops
}}
?>
This will complete the loop, move onto the next result in the array, complete the loop and so on..
edit - missed out the end of the second loop - updated now.