I am looking for a way to simulate the fgetcsv() functionality for a string. fgetcsv() only support reading from a file ...
I have an array which holds the different lines but using explode() on each line ignores the " " to enclose a field, making it split on each , instead of just the field delimiters.
myfield1, "1,23" returns array ("myfield1", "\"1", "23\"") with explode instead of array("myfield1", "1,23")
explode on "," does not work either - not all fields are enclosed 🙁
Any idea ?