It seems that every library out there stopped development some time in 2008. I'm not sure what's up with that. Here seem to be the popular-ish options:
- PEAR's File_CSV, with zero end-user documentation, as we've come to expect from PEAR. This looks like the expected configuration info, including those for separator and quote.
- parseCSV seems sane enough
- PHP CSV Utils is linked quite a bit, though the "new blog" hosting updates is long gone.
I can't vouch for any of these. I happen to live in a magical land where I only need to deal with Excel-generated CSV files that will never, ever contain newlines in a field. This lets me get away with fgetcsv
/fputcsv
and be blissfully ignorant of how they're broken in the real world.