Another silly newbie type question but important
Posted: Tue Dec 07, 2004 1:05 pm
The following is the current layout of my php script, can I just define the global variables outside the function thereby doing one definition of them, or must I do it like it is already setup.
Thanks
Thanks
Code: Select all
$currDate = date("l, F j, Y");
$currTemp;
$feelsLike;
$skyCond;
$windSpeed;
$windDir;
$windGust;
$barPressure;
$barState;
$uvIndex;
$uvRisk;
$wIcon;
$celtemp;
$fLikeCel;
$observPost;
$observTime;
$location;
$visability;
$humidity;
$dewpoint;
// gets and parses weather from weather.com
function getWeatherReport()
{
global $currTemp;
global $feelsLike;
global $skyCond;
global $windSpeed;
global $windDir;
global $windGust;
global $barPressure;
global $barState;
global $uvIndex;
global $uvRisk;
global $wIcon;
global $celTemp;
global $fLikeCel;
global $observPost;
global $observTime;
global $location;
global $visability;
global $humidity;
global $dewpoint;