daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest May 3rd, 2012 433 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // FORECAST //////////////////////////////////////////////////////////////////////////////////////////
  2.  
  3. $QueryForecastDecode = json_decode($QueryForecast);
  4.  
  5. // build forecast array // forecast array structure: Day, Hi, Lo, ForecastText, ForecastIconURL, PrecipPercent
  6. $f = 0;
  7. $ForecastArray = array();
  8. while ($QueryForecastDecode->{'forecast'}->{'simpleforecast'}->{'forecastday'}[$f]) {
  9.         $Forecasts = $QueryForecastDecode->{'forecast'}->{'simpleforecast'}->{'forecastday'}[$f];
  10.         $ForecastArray[$f] = array(
  11.                 $Forecasts->{'date'}->{'weekday_short'},
  12.                 $Forecasts->{'high'}->{'fahrenheit'},
  13.                 $Forecasts->{'low'}->{'fahrenheit'},
  14.                 $Forecasts->{'conditions'},
  15.                 $Forecasts->{'icon_url'},
  16.                 $Forecasts->{'pop'}
  17.         );
  18.         $f++;
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top