Есть JSON:
Array
(
[0] => stdClass Object
(
[call_id] => 147532********************200
[sip] => 100
[callstart] => 2016-10-01 16:30:36
[clid] => Operator (100)
[destination] => 8***************
[disposition] => answered
[seconds] => 3
[is_recorded] => true
[pbx_call_id] => out_************************************
)
[1] => stdClass Object
(
[call_id] => 14753****************3
[sip] => 100
[callstart] => 2016-10-01 16:31:06
[clid] => Operator (100)
[destination] => 89**************
[disposition] => answered
[seconds] => 2
[is_recorded] => true
[pbx_call_id] => out_**********************************
)
[2] => stdClass Object
(
И так далее, 20 объектов.
Как мне их в цикле вывести каждый по порядку в читаемый вид?
Пробую так:
$answerObject = json_decode($answer);
foreach ($answerObject as $key => $value) {
echo $answerObject->call_id;
}
Но как то пусто на странице :( Помогите! :)