展开全部
使用json_decode($json, true)将json字符串转化为php数组:
<?php
$json = '{"create": 14275555101,"data":{"object":{"order_no":"123456789","amount":100}},"object":"event"}';
$arr = json_decode($json, true);
if(isset($arr['data']['object']['order_no']))
{
var_dump($arr['data']['object']['order_no']);
}
if(isset($arr['data']['object']['order_no']))
{
var_dump($arr['data']['object']['amount']);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询