I need to capture some string arrays.. and i've been trying but i can't :$
i've this in my code:
<?php
$feed = "[['2013/04/03',8.300],['2013/04/04',8.320],['2013/04/05',8.400]]";
preg_match_all("/\[(.*?)\]/",$feed,$matches);
print_r($matches);
and is returning:
Array
(
[0] => Array
(
[0] => [['2013/04/03',8.300]
[1] => ['2013/04/04',8.320]
[2] => ['2013/04/05',8.400]
)
[1] => Array
(
[0] => ['2013/04/03',8.300
[1] => '2013/04/04',8.320
[2] => '2013/04/05',8.400
)
)
how can i make with preg_match_all or preg_split.. or whatever method is needed to return one array of elements like the $matches[1][1] or $matches[1][2]??
i mean the format of each element should be:
'2013/04/05',8.400
hope to be clear :)
and thanks in advance!!