$json_string='{"id":1,"name":"rolf","country":"russia","office":["google","oracle"]} ';$obj=json_decode($json_string);//print the parsed dataecho $obj-name; //displays rolfecho $obj-office[0]; //displays google
$json_string='{"id":1,"name":"rolf","country":"russia","office":["google","oracle"]} '; $obj=json_decode($json_string); //print the parsed data echo $obj->name; //displays rolf echo $obj->office[0]; //displays google