PHP decoding json

后端 未结 5 1836
误落风尘
误落风尘 2021-01-15 18:58

could anyone here help me with php an decoding json? Im trying to decode a json api url

Here is what I have at the moment:

  $string = \'
    {
              


        
5条回答
  •  滥情空心
    2021-01-15 19:47

    - or . are not valid object property names. Try instead using json_decode($string, true) (the true stands for "decode as an associative array"), and then do $json_o['workers']['someusername.jason-laptop'].

提交回复
热议问题