mi da un errore:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';INSERT INTO numeri (id_gara, n_part, n_stima) VALUES ('4128' '2' '88' );INSE' at line 1

credo perchè manca la virgola a dividere i value di

Codice PHP:
$sql .= "'".$dati[$i+$j]."' "
ma se l'aggiungo da errore in quanto la riporta anche alla fine dove andrebbe tolta
ad esempio prova ad inserire VALUES ('4128', '2', '88', );

come si fa a togliere l'ultima virgola?

Grazie ancora