str_getcsv()
As of PHP 5.3, this function is available to parse a comma separated value (CSV) string into an array.
You may also specify the delimiter, enclosure, and escape characters (one character each) which default as comma, double quote, and backslash respectfully.
$data = str_getcsv('Robert, robert@example.com, 867-5309, 123 Fake St., "This guy knows how to enclose his commas in double quotes, and still have a good time!"'); /* array ( 0 => 'Robert', 1 => 'robert@example.com', 2 => '867-5309', 3 => '123 Fake St.', 4 => 'This guy knows how to enclose his commas in double quotes, and still have a good time!' ) */
See the manual entry for str_getcsv()
