class Someclass{
function topFunction()
{
function makeMeGlobal($var)
{
global $a, $b;
$a = "a".$var;
$b = "b".$var;
}
makeMeGlobal(1);
echo "$a <br>";
echo "$b <br>";
makeMeGlobal(2);
echo "$a <br>";
echo "$b <br>";
}
}
I am using that test code on codeigniter but nothings happen.
I suppose to print a result like this
a1
b1
a2
b2
How to handle those functions inside a class?