let me make this quick. I have this array :
$newdata = array(2)
{[0] => array(1)
{["data"] => string "{"A":2, "B":5, "C":[{"X":12, "Y":15},{"X":13, "Y":18}]}"}
[1] => array(1)
{["data"] => string "{"A":5, "B":2, "C":[{"X":11, "Y":17},{"X":18, "Y":14}]}"}}
How I can access A, B, C and X and Y inside it? I checked it with var_dump(), the result :
var_dump($newdata) is all of the array above
var_dump($newdata[0]) is the first array
Now this is the problem
I want to print element A in first array with :
var_dump($newdata[0]["A"]) -> NULL
var_dump($newdata[0]->A) -> NULL
And so when I try to print inside C :
var_dump($newdata[0]["A"][0]) -> NULL
var_dump($newdata[0]->A[0]) -> NULL
How I can access it? Any help most appreciated.
Here is a var_export()
of $newdata
array (
0 => array ('data' => '{"A":2, "B":5, "C":[{"X":12, "Y":15],{"X":13, "Y":18}]}'),
1 => array('data' => '{"A":5, "B":2, "C":[{"X":11, "Y":17],{"X":18, "Y":14}]}'}