forse non ho capito, ma se ti aspetti + dati perchè non usi while?

while ($rig= mysql_fetch_array ($img))
{
print $rig[url];
}

o simili?

eraclito