Began to get acquainted with Json, code:
<?php $json_string='{"id":1,"name":"ivan","country":"Russia","office":["yandex"," management"]} '; $obj=json_decode($json_string); echo $obj->name; echo $obj->office[0]; ?> Displays:
name; echo $obj->office[0]; ?> I can not understand why