I have a csv file which looks like this
$lines[0] = \"text, with commas\", \"another text\", 123, \"text\",5;
$lines[1] = \"some without commas\", \"another
here is also a simple method to get read csv file.
$sfp = fopen('/path/to/source.csv','r'); $dfp = fopen('/path/to/destination.csv','w'); while ($row = fgetcsv($sfp,10000,",","")) { $goodstuff = ""; $goodstuff = str_replace("¦",",",$row[2]); $goodstuff .= "\n"; fwrite($dfp,$goodstuff); } fclose($sfp); fclose($dfp);