Fai un array multidimensionale usando pero' mysql_fetch_assoc() per non caricare due volte lo stesso record.

Codice PHP:


$query 
mysql_query("SELECT * FROM tabella ") or die . (mysql_error()); 

while (
$row mysql_fetch_assoc($query)) 

    
$tabella[] = $row;

}

echo 
"<pre>";

print_r($tabella); 
vedi tu se e' quello che cerchi. Ovviamente se vuoi una numerazione corrispondente all'id... usa l'id come indice numerico dell'array $tabella.