The php manual leads me to believe that making a variable available to all the functions and includes in my script as easy as:
global $a = "foo";
function some_function(){
echo $a;
}
but in practice this fails. The manual also says that this should work:
$a = "foo";
function some_function(){
echo $a;
}
but, it doesn't. The only way I've gotten it to work thusfar is:
$a = "foo";
function some_function($a){
echo $a;
}
Any thoughts?