CSV file to MySQL with PHP 
//draft


$csv='...CSV file (string) exported from open office spread sheet';

$lines = explode("\n", $csv);

$array = array();
foreach ($lines as $line) {
$array =str_getcsv($line);

echo "INSERT INTO TestTable SET `Field1`='".addslashes($array[3])."',
`Field2`='".addslashes($array[3])."',";

}


[ view entry ] ( 1392 views )   |  print article

<<First <Back | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Next> Last>>



2024 By Angel Cool