l'ultima modifica che ho fatto è questa:

ho aggiunto
codice:
$array2[$i] = $_POST[quantità . $i];
prima che lo mettessi funzionava...