php中iphonejson响应的json解码

php中iphonejson响应的json解码,php,json,Php,Json,我从iphone应用程序获得json响应,如下所示 {"json":{"age":"23","userid":"1","weight":"55","fullname":"goutham"}}; 有人能告诉我如何解码吗?使用PHP的函数: 来源:上述参考手册中的示例使用json_解码 $array = json_decode($string, true); /// please note the second parameter 'true' here, it is needed if yo

我从iphone应用程序获得json响应,如下所示

{"json":{"age":"23","userid":"1","weight":"55","fullname":"goutham"}};
有人能告诉我如何解码吗?

使用PHP的函数:


来源:上述参考手册中的示例使用json_解码

$array = json_decode($string, true);
/// please note the second parameter 'true' here, it is needed if you want your o/p as array or you will get it as object

print_r($array);
参考:

您可以使用

json_decode();

或者可以使用json_code.age;像这样的json_code.userid 参考此


或者你可以参考这个onlinr转换器

我认为我们忽略了这个问题,从你提供的json字符串看,你可以清楚地看到你有一个带有属性的对象

看看json的规范

{json:{年龄:23岁等

我希望通过对其进行json_解码,您可以通过简单地说:$json->age来获得对象属性

希望这有帮助

json_decode();
json_decode($my_json);