I am looking for some routines that will read and parse CSV files. I have written some code to do this, but the data files I download are not always evenly formatted for data extraction. I generally have to clean up the file manually before I can run my parser.
Asked
Active
Viewed 116 times
0
-
See also [CSV Library for PHP?](http://stackoverflow.com/questions/5341219/csv-library-for-php) and [Is there a popular and/or robust PHP CSV library?](http://stackoverflow.com/questions/3087287/is-there-a-popular-and-or-robust-php-csv-library) – Tgr Dec 23 '12 at 23:12
1 Answers
1

John Conde
- 217,595
- 99
- 455
- 496
-
Wow. Well, I am embarrassed. Who'da thunk that it was built into PHP? (not me, apparently). Thanks much for this John. – user351329 May 27 '10 at 00:11
-
@Sorcerer86pt `fgetcsv()` is much older and `fputcsv()` is at least from 5.1. But PHP5.3 should be used nowadays anyway ;) – KingCrunch Dec 23 '12 at 22:49