Codice PHP:

[...]

$q=mysql_query('...');

while(
$fa=mysql_fetch_array($q)) echo $fa[campo];