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" Link to comment https://forums.phpfreaks.com/topic/242865-read-csv-line-into-an-array/ Share on other sites More sharing options...
WebStyles Posted July 26, 2011 Share Posted July 26, 2011 have you tried fgetcsv() ? Link to comment https://forums.phpfreaks.com/topic/242865-read-csv-line-into-an-array/#findComment-1247447 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.