Currently I have a situation in which I had a class using an other class
//given 2 classes classa and classb
$nr = 1;
$a = new classa($nr);
$b= new classb($a)
//Now $nr is also known in $b
//But when I do this
$b->a->addtonr(1);
//$nr in $b is now increased by 1
//but $nr in $a is still 1
My question is how to make $a a global class so I $nr in $a is also increased
--Update: Global does not work. I managed to make my classes global, however this is not the solution. There are still 2 different instances of the variable $nr ($a->nr).
How to link them!?