I'm having an issue parsing a CSV file in which some fields contain commas. My CSV looks something like this:
To parse my csv files I was reading it into an array with file(), and then looping the lines, exploding by comma, IE explode(',',$li ne), however this doesn't work as it will explode the commas in the date fields.
I guess my main question is how do I parse a CSV which may or may not contain comma's in some of the fields.
Thanks!
Code:
123,asdflkj23klj,"Sept. 22, 2008",some field,one more field,"Aug 1,1983"
I guess my main question is how do I parse a CSV which may or may not contain comma's in some of the fields.
Thanks!
Comment