The Little Guy Posted July 26, 2011 Share Posted July 26, 2011 how can I split a string into an array using a comma as the delimiter, BUT if the comma is between two quotes (double/single) don't split. Basically I am reading a CSV file, and and I want an array of values for the row, but some rows have commas in the string, such as an address. Example: "Billly Bob","My, House" Should give an array like so: [0] => "Billy Bob", [1] => "My, House" Quote Link to comment Share on other sites More sharing options...
WebStyles Posted July 26, 2011 Share Posted July 26, 2011 have you tried fgetcsv() ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.