Menu
Hi,
How can I access a variable in a function in another function?
for example :
[CODE]
<?php
$a = 2;
function test1()
{
global $a; // This access the $a
$b = 3; // A variable that is being defined in this function
function test2()
{
global $a; // This access the $a also
global $b; // This DOES NOT ACCESS $b
}
}
?>
How can I access the $b [b]without