2
I have a string consisting of (enclosed quotes):
"campo","outrocampo","maisumcampo"
I need to separate these fields, without the quotes, 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 will contain a comma inside the quotes, I think I will have problems. How to avoid this?
Avoid headlines like "HELP NEED HELP".
– Filipe.Fonseca
Best title ever on SOPT :D Then I delete the comment, but had to comment.
– Jorge B.
@Jorgeb. at least he was sincere right :D
– Bacco