this is my string, and I want it to convert into 2D Array.
[email protected];"Hi ;John";man;405089;
[email protected];Hi Sarah;woman;405089;
And I want to create array from this. I fount this code:
$ret = array_map (
function ($_) {return explode (',', $_);},
explode (';', $data)
);
Therefore instead of ',' would be ';' and instead of ';' would be '\n', right?
But It doesn't work correctly yet. If you look once more, there is "Hi ; John"..
I want make this code to ignore everything inside of " ", because there is a semicolon.
;as the field separator.