How to loop through this json decoded data in PHP?

后端 未结 5 998
一向
一向 2020-12-10 21:40

I\'ve have this list of products in JSON that needs to be decoded:

\"[{\"productId\":\"epIJp9\",\"name\":\"Product A\",\"amount\":\"5\",\"identifier\":\"242\         


        
5条回答
  •  时光说笑
    2020-12-10 22:20

    Did you check the manual ?

    http://www.php.net/manual/en/function.json-decode.php

    Or just find some duplicates ?

    How to convert JSON string to array

    Use GOOGLE.

    json_decode($json, true);
    

    Second parameter. If it is true, it will return array.

提交回复
热议问题