Gazie all'aiuto di LUKY 70, un utente a cui devo molto, ho risolto il problema.
In pratica l'errore riguardava il file php che andava così modificato:

.....
$body .= "Numero passeggeri*: " . trim(stripslashes($_POST["quantity"])) . "\n";
for ($i=0; $i<(int)trim(stripslashes($_POST["quantity"])); $i++){
$body .= "Nome: " . trim(stripslashes($_POST["nome"][$i])) . "\n";
$body .= "Cognome: " . trim(stripslashes($_POST["cognome"][$i])) . "\n";
$body .= "Data di nascita: " . trim(stripslashes($_POST["datanascita"][$i])) . "\n";
$body .= "N° documento: " . trim(stripslashes($_POST["numerodoc"][$i])) . "\n";
$body .= "Scadenza documento: " . trim(stripslashes($_POST["scadenzadoc"][$i])) . "\n";
}
......

Adesso funziona perfettamente. Grazie di nuovo a LUKY 70.