PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
$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;
tried and got my answer. The answer would be that I have to define the globals inside the function... I suppose I should make this into a class file, but that would require work Anyhow, mark this one solved.