【发布时间】:2012-09-07 21:14:16
【问题描述】:
我有一个 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 解析每个值以进行进一步的数据处理吗?
谢谢。
【问题讨论】:
-
...什么?您并没有认真尝试在 PHP 中对某些内容进行 json_encode,然后在同一个 PHP 中对其进行 json_decode?我很困惑。
-
他可能想将编码的 json 存储在某个地方以备将来使用