使用json_depre():
$depred = json_depre($json_string);$comments = $depred->data[0]->comments->data;foreach($comments as $comment){ $name = $comment->from->name; $message = $comment->message; //do something with it}
使用json_depre():
$depred = json_depre($json_string);$comments = $depred->data[0]->comments->data;foreach($comments as $comment){ $name = $comment->from->name; $message = $comment->message; //do something with it}