我有一个URL参数传递使用json_encode每个值就像如下:PHP获取值
{
"countryId":"84",
"productId":"1",
"status":"0",
"opId":"134"
}
我可以使用json_decode
来解析每个值:
$json = array
(
'countryId' => $_GET['CountryId'],
'productId' => $_GET['ProductId'],
'status' => $_GET['ProductId'],
'opId' => $_GET['OpId']
);
echo json_encode($json);
,因为它是返回的结果进一步的数据处理?
谢谢。如果第二值是真的
你试过了吗? – JaredMcAteer
...什么?你没有认真地尝试在PHP中使用json_encode,然后在同一个PHP中json_decode呢?我很困惑。 – FrankieTheKneeMan
他可能想将编码的json存储在某个地方以备将来使用 –