I want to read .csv file in PHP and put its contents into the database. I wrote the following code:
$row = 1; $file = fopen(\"qryWebsite.csv\", \"r\"); while
$fp = fopen('ReadMe.csv','r') or die("can't open file"); print "\n"; while($csv_line = fgetcsv($fp,1024)) { print ''; for ($i = 0, $j = count($csv_line); $i < $j; $i++) { print ''.$csv_line[$i].''; } print "\n"; } print ''; fclose($fp) or die("can't close file");
More Details