例:
<?php
$data={"state":"success","code":null,"errorMsg":null,"args":null}
$arr=json_decode($data,ture);//必须加上ture参数强制转换为数组
echo $arr['state'];
输出结果是success
例:
<?php
$data={"state":"success","code":null,"errorMsg":null,"args":null}
$arr=json_decode($data,ture);//必须加上ture参数强制转换为数组
echo $arr['state'];
输出结果是success