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
You can use json_decode() method
Please refer this link http://php.net/manual/en/function.json-decode.php