Globals globals.. what ever happened to parameters?
Try passing your variables to your functions like this:
$my_var="hello";
my_function($my_var);
exit;
function my_function($a)
{
print $a;
};
If you want to also be able to change the content of the variable you pass to your function and have it change for the whole program:
function my_function(&$a)
{
$a="byebye";
};
lovely. no messy globals. 🙂