次のコードは機能しません。
<?php
$json_string = file_get_contents("http://api.wunderground.com/api/7ec5f6510a4656df/geolookup/forecast/q/40121 .json");
$parsed_json = json_decode($json_string);
$temp = $parsed_json->{'forecast'}->{'date'};
echo "Current date is ${temp}\n";
?>
次のように配置すると機能します。
$temp = $parsed_json->{'location'}->{'city'};
私はここで何が欠けていますか笑