Hi I have used curl to get some json api data and that is all working fine. I have ran into a problem when trying to get a specific value. I have decoded the json into an array but I still cant seem to get a specific value.
Here is my code:
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, 'https://bittrex.com/api/v1.1/public/getcurrencies');
$result = curl_exec($curl);
curl_close($curl);
$json = json_decode($result, true);
print_r($json);
so if you go to this url https://bittrex.com/api/v1.1/public/getcurrencies you can see the data I am pulling in. I want to get the value of a Currency.
I tried changing my print to this print_r($json['Currency']);
that returned nothing. I also tried this print_r($json[1]);
which I thought would at least return something but yet again I got no response.
I have run print_r(gettype($json));
that returned an array so it is 100% an array.