I'm downloading some json using the following:
$api_resp = json_decode(@file_get_contents($api_url),true);
Which give the following array (using var_dump):
array(4) {
["body"]=>
array(1) {
[1657134820]=>
array(1) {
[0]=>
float(1.313)
}
}
["status"]=>
string(2) "ok"
["time_exec"]=>
float(0.031042098999023)
["time_server"]=>
int(1657140220)
}
How can I access the 1.313 float value?
I'm able to access the body using $api_resp['body'], but how do I go from there? $api_resp['body'][0] gives "PHP Notice: Undefined offset: 0"