How to decode a json response from API

后端 未结 3 504
一向
一向 2021-01-29 06:47

I am calling data from an API like this:

$curl = curl_init();
//adding fields to the curl object to enter the site
curl_setopt($curl, CURLOPT_URL, $my_url);
curl         


        
3条回答
  •  渐次进展
    2021-01-29 06:55

    You can use json_decode() method

    Please refer this link http://php.net/manual/en/function.json-decode.php

提交回复
热议问题