{"count":1,"result":{"2020-03-15":{"confirmed":1138,"deaths":20,"recovered":2}}}
om te zetten in een php array.
Ik wil de data eruit kunnen halen, maar het lijkt niet te lukken. heb gegoogled, maar dit geeft een melding:
$obj = json_decode($res, TRUE);
$res = file_get_contents('https://covidapi.info/api/v1/country/NLD/2020-03-15');
foreach($res as $key=> $value)
{
echo 'Your key is: '.$key.' and the value of the key is:'.$value;
}
Warning: Invalid argument supplied for foreach()