I've got this JSON Output:
{"ok":true,"license":"CC BY 4.0 - http:\/\/creativecommons.tankerkoenig.de","data":"MTS-K","prices":{"90d20149-1047-43d3-9b80-4c6f7fd22499":{"status":"open","e5":1.479,"e10":1.459,"diesel":1.259}}}
and I want to get the values of e5, e10 and diesel into a PHP Variable. Like:
$Tankstelle = json_decode($json);
$PriceE5 = (float)utf8_decode($Tankstelle->prices->90d20149-1047-43d3-9b80-4c6f7fd22499->e5);
But it doesnt work, as there is this integer as a value. Can you help me? Thank you!
No comments:
Post a Comment