<?php
include("conex.php");
$row = 0;
$fp = fopen ("PRUEBA.csv","r");
$data = fgetcsv ($fp, 1000, ",");

while ($data = fgetcsv ($fp, 1000, ","))
{
count ($data);
print " <br>";
$row++;
echo "$row- ".$data[0].$data[1];
$insertar="INSERT INTO mantareo (dociden_per,origen,destino,hora,fechatareo,fechallegada,via) VALUES ('$data[0]','$data[1]','$data[2]','$data[3]','$data[4]','$data[5]','$data[6]')";
mysql_query($insertar);
}
fclose ($fp);
?> 