Discussion
:
accessing vars from within classes
Afficher un message
12/09/2007, 20h47
#
2
ragearc@gmail.com
Messages: n/a
Hébergeur:
Re: accessing vars from within classes
Yep, I believe global would work.
PHP:
$myVar = new MyClass();
class OtherClass {
private $otherVar;
function myMethod() {
global $myVar;
$this->otherVar = $myVar;
}
}
ragearc@gmail.com
Page generated in
0,04734
seconds with
9
queries