php 解析java传过来的json数据

  例如:

    java所传json数据:

      array(1) { ["info"]=> string(1437) "{"error_data":[{"error_info":"通道绑卡失败","mobile":"15605139548","detail_no":"201709211201019981","error_no":"30001"},{"error_info":"通道绑卡失       败","mobile":"13478102079","detail_no":"201709211201018214","error_no":"30001"}],"finish_datetime":"2017-09-21 12:01:11","order_info":"批量注册处理完成","order_no":"201709211201016363","order_status":"1",

"recode":"10000","remsg":"成功","signdata":"4421e04ef428d737ab6f9f224a6d8e25","success_data":[{"mobile":"13710921452","detail_no":"201709211201019133","platcust":"2017092112005150310067"},{"mobile":"18600460669","detail_no":"201709211201012069","platcust":"2017092112005334410068"},{"mobile":"13751321821","detail_no":"201709211201014925","platcust":"2017092112005739210069"},{"mobile":"13080869423","detail_no":"201709211201018240","platcust":"2017092112005780910070"},{"mobile":"17135507511","detail_no":"201709211201018871","platcust":"2017092112005968910071"},{"mobile":"18602133601","detail_no":"201709211201019108","platcust":"2017092112010202010072"},{"mobile":"13859868072","detail_no":"201709211201018658","platcust":"2017092112010601510073"},{"mobile":"15295535329","detail_no":"201709211201017890","platcust":"2017092112010809410074"},{"mobile":"13945885123","detail_no":"20170921120101600","platcust":"2017092112011011410075"},{"mobile":"13958139196","detail_no":"201709211201011970","platcust":"2017092112011172610076"}],"success_num":10,"total_num":12}" } 

  

    PHP转化成数组形式:

      $list_arr=json_decode($res['info'],true);
      foreach ($list_arr['error_data'] as $v){
          var_dump($v);
    }


    

转载于:https://www.cnblogs.com/qinmei/p/7570217.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值