Help deal with an array
there is such an array bitriksa24 -
{ "result": [{ "ID": "150", "EMAIL": [{ "ID": "172", "VALUE_TYPE": "WORK", "VALUE": "666@666.666", "TYPE_ID": "EMAIL" } ] } ], "total": 1, "time": { "start": 1515742416.5858, "finish": 1515742416.6568, "duration": 0.070952892303467, "date_start": "2018-01-12T10:33:36+03:00", "date_finish": "2018-01-12T10:33:36+03:00" } } I can not pick up the "ID":"172" and "VALUE":"666@666.666"
I'm writing - echo $result['result'][0]['ID'] - displays 150 ( "ID":"150" ) everything is correct.
And when I write this echo $result['result'][0]['ID']['EMAIL'][0]['ID'] instead of "ID":"172" - 1 output for me
help to deal with the array, gentlemen. Maybe there is an easier way to output the elements of an array?
$result = json_decode($str, true)- Alexey Shimanskyprint_r($result);to the questionprint_r($result);- Alexey Shatrov