I am trying to parse the following string into an array.
$str = [0,"Victoria Station, Bus Station Stand",null,null,0,null,51.496169,-0.143633]
I am using
$result = explode(',', $str);
and am getting an array like this
Array ( [0] => [0 [1] => "Victoria Station [2] => Bus Station Stand" [3] => null [4] => null [5] => 0 [6] => null [7] => 51.496169 [8] => -0.143633] )
But I need “Victoria Station, Bus Station Stand” to be 1 item in the array. I understand that this could be achieved with regular expressions. But I am new to that. Your guidance would be much appreciated.
This looks like
jsonto me tryOutput