Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FORECAST //////////////////////////////////////////////////////////////////////////////////////////
- $QueryForecastDecode = json_decode($QueryForecast);
- // build forecast array // forecast array structure: Day, Hi, Lo, ForecastText, ForecastIconURL, PrecipPercent
- $f = 0;
- $ForecastArray = array();
- while ($QueryForecastDecode->{'forecast'}->{'simpleforecast'}->{'forecastday'}[$f]) {
- $Forecasts = $QueryForecastDecode->{'forecast'}->{'simpleforecast'}->{'forecastday'}[$f];
- $ForecastArray[$f] = array(
- $Forecasts->{'date'}->{'weekday_short'},
- $Forecasts->{'high'}->{'fahrenheit'},
- $Forecasts->{'low'}->{'fahrenheit'},
- $Forecasts->{'conditions'},
- $Forecasts->{'icon_url'},
- $Forecasts->{'pop'}
- );
- $f++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement