Does anyone know of a way to convert a CSV file to a flat ASCII file? I don't know if it's possible using ereg_replace in some way. I would greatly appreciate anyone who has any ideas on how to do it. TIA.
Convert CSV to flat ASCII?
Do you mean from this:
item1,item2,item3
To this:
item1
item2
item3
?
If so:
$csv = file_get_contents($file);
$flat = str_replace(',', "\n", $csv);