If I have a function call another function, is there a way I can include the variable scope from the parent function in the the called function?
I know $GLOBALS exists for global variables, but what about for variables of a parent function.
For example
$a=1;
function myFunc()
{
$a=2;
myFunc2();
}
function myFunc2()
{
// here is where i need to be able to get
// $a as 2
}
Passing the variable to the function like myFunc2($a) isn't an option for me.
Any ideas? Thanks in advance
-Justin