如何通过PHP从这个JSON中获取“required_version”?
{
"response": {
"success": true,
"up_to_date": false,
"version_is_listable": false,
"required_version": 13576,
"message": "Your server is out of date, please upgrade"
}
}
非常感谢, 最诚挚的问候 恩格
答案 0 :(得分:0)
$json = <<<'__EOS__'
{
"response": {
"success": true,
"up_to_date": false,
"version_is_listable": false,
"required_version": 13576,
"message": "Your server is out of date, please upgrade"
}
}
__EOS__;
$obj = json_decode($json);
echo $obj->response->required_version;