一直在通过stackoverflow寻找这个,所以我确实尝试过纠正这个问题。不知道我在这里做错了什么。有什么建议么?
<?php
$string = '{
"status": "success",
"th_size": "small",
"users": [
{
"user_id": 159826,
"username": "WillBeUsed",
"online": true,
"is_away": false,
"access": "public",
"render_info": {
"profile_url": "/person1",
"profile_image": "11e5a496f13366a0c4ce000403aa862",
"language": "english",
"chat": "ready"
},
"new": false,
"back": false
}
],
"online_count": 1
}';
$result = json_decode($string, true);
//echo $result['status']; // This works
echo $result->users[0]->render_info->profile_url; // This don't work
?>