This question already has an answer here:
Example
function a(){
$num = 1;
function b(){
echo $num; // how to get $num value?
}
}
In this case global
not working, because $num
isn't global variable.
This question already has an answer here:
Example
function a(){
$num = 1;
function b(){
echo $num; // how to get $num value?
}
}
In this case global
not working, because $num
isn't global variable.
You could use the S_SESSION to get the variable?
Not sure nested function is the way to go btw.