foreachサイクルを使用せずに、最初の日だけ、wunderground JSONからいくつかのデータを解析しようとしています。この JSON の例: http://api.wunderground.com/api/f429b85619ed45e8/geolookup/conditions/forecast/q/Australia/Sydney.json
初日だけ取得したい:
$json_string = file_get_contents('http://api.wunderground.com/api/f429b85619ed45e8/geolookup/conditions/forecast/q/Australia/Sydney.json');
$parsed_json = json_decode($json_string);
$weekday = $parsed_json->{'forecast'}->{'simpleforecast'}->{'forecastday[0]'}->{'date'}->weekday;
私はたくさんグーグルで検索し、たくさんの例を試しましたが、通常はエラーが発生するか、何も発生しません。ヘルプ?