I have a string that consists of (included quotation marks):
"campo","outrocampo","maisumcampo"
I need to separate these fields, without the quotation marks, into an array.
What I'm doing is a
$string = str_replace('"', NULL, $string)
and then a
$array = explode(',', $string);
However, if any of the fields in the original string contain a comma inside the quotation mark, I think I'll have problems. How to avoid this?