我以前从来没有使用过json,我不确定如何完全使用它。因此,从本质上讲,我需要获取rgDescriptions表中的所有项,但我真的不确定如何做到这一点。
所以,如果有人能给我指出正确的方向,那就太好了。我试图在Json上查找文档/教程,但似乎找不到高级的东西。
只有像{"id":"2","instanceID":"8"}这样的东西
Example of the json I want to decode
发布于 2015-10-05 13:50:33
使用json_desode()解码json格式。
$json = '{"id":"2","instanceID":"8"}';
$decoded = json_decode($json);
print_r($decoded);// will print decoded format of your json
echo $decoded->id; // outputs => 2
echo $decoded->instanceID; // outputs => 8Otuput:
stdClass Object
(
[id] => 2
[instanceID] => 8
)https://stackoverflow.com/questions/32941717
复制相似问题