non ho capito...intendi questo?
Codice PHP:
$q "QUERY"
while($r mysql_fetch_array($q)){
print_r($r);