I am using the following:
<?php
$url = '...';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => "GET"
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
$response = json_decode($response, true);
echo gettype($response); /$response/ THIS RETURNS INTEGER FOR SOME REASON!
?>
So the $response
I am getting is of type integer, and I am unable to read the elements of this JSON.
Also note that when I echo the response, 1 is printed after it.