JSON parsing problem for PHP

Source: Internet
Author: User
{"type": "Success", "code": 0, "message": null, "Data": {"box_list": [{"Boxid": "Cfce938f2c7c11e69d5700000a00191c", " Boxnum ":" Nantong_test1 "," Boxname ":" My Safe "," BOXIP ":" "," Boxmac ":" "," Powerstatus ":" 0 "," networkstatus ":" 0 "," Doorstatus ":" 2 "," Shakeinfo ":" 1 "," Devicestatus ":" 1 "," Boxstatus ":" 1 "," Verifystatus ":" "," lockpwd ":" abcd07033132333435363f030d "," Boxversion ": 0," Channelid ":" Nantong_test1 "," Boxcontrolpwd ":" 874d05d4bdd9077a7aefa0dc8c8cbd1f "," Adminuserid ":" 62f199be303b11e684c000000a00191c "," BoxPhone ":" "," DefaultSkin " : "0", "networkname": "", "Agentid": "", "createtime": null, "Warninhcount": 0, "batterylevel": null, "temp": null},{"Boxid ":" 73b1a2932c7211e69d5700000a00191c "," Boxnum ":" Lvlei6 "," Boxname ":" My Safe "," BOXIP ":" "," Boxmac ":" "," Powerstatus ": "0", "networkstatus": "0", "doorstatus": "2", "Shakeinfo": "1", "Devicestatus": "1", "Boxstatus": "1", "Verifystatus": "", "Lockpwd": "abcd07033132333435363f030d", "boxversion": +, "Channelid": "Lvlei6", "Boxcontrolpwd": " 874d05d4bdd9077a7aefa0dc8c8cbd1f "," Adminuserid ":" 31f674062c8311e69d5700000a00191c "," Boxphone ":" "," Defaultskin ":" 0 "," networkname ":" "," Agentid ":" "," createtime ": null," Warninhcount ": 0," Batterylevel ": null," temp ": null}]," user ": {" id ":" 296d4ecc303d11e684c000000a00191c "," UserName ":" Kaka "," LoginName " : "12@qq.com", "loginpwd": "874d05d4bdd9077a7aefa0dc8c8cbd1f", "UserFinger1": "", "UserFinger2": "", "UserFinger3": "", "Type": "0", "Userphone": "", "Userphoto": "http://hissdata.blob.core.chinacloudapi.cn/userpicdata/ 296d4ecc303d11e684c000000a00191c_1465717285898.png "," Channelid ":" "," userlistendate ": 1465694992000," BoxNum ":" ", "Controlpwd": "", "Usernum": "", "useraddress": "", "Usermail": "12@qq.com"}}


To get the data under all subscripts in the box_list,
The way I get $c = $data [' Data '] [' box_list '][0][' Boxid ']; However, I do not know why the 73b1a2932c7211e69d5700000a00191c is the boxid of the box_list subscript 1. can only get this.
Seeking the Great God!!!!!!!
Seeking the Great God!!!!!!!
Seeking the Great God!!!!!!!


Reply to discussion (solution)

No problem, you print out the parsed array to check

   

cfce938f2c7c11e69d5700000a00191c73b1a2932c7211e69d5700000a00191c
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.