php 从 json 编码获取值
我有一个url传递参数使用json_encode每个值,如下所示:
$json = array
(
'countryId' => $_GET['CountryId'],
'productId' => $_GET['ProductId'],
'status' => $_GET['ProductId'],
'opId' => $_GET['OpId']
);
echo json_encode($json);
它返回的结果为:
{
"countryId":"84",
"productId":"1",
"status":"0",
"opId":"134"
}
我可以使用来解析每个值以进行进一步的数据处理吗?json_decode
谢谢。