I have a weird CSV file. It has these characteristics:
- The first line (headers) are seperated by a semicolon ;
- All the rest is seperated by a comma ,
- The file is in ISO-8859-1 format
I can read the file, but I do an external conversion first, namely
"sed -i 's/;/,/g' " . $arg1;
That is depending on my linux shell and works fine locally. But I want it more robust and convert it within PHP so that the first line headers are sepeated with a comma too (and the output is UTF-8 if possible)
Any sugestions how to do this?
Thanks