$result = mysql_query(...); while($row = mysql_fetch_array($result)){ ... }