consider this:
?
class A {
function A() {
$b = 'hello world';
}
function B() {
$c = new C();
$c->doStuff();
}
}
class C {
function C() {
$blah = 0;
}
function doStuff() {
echo 'foo bar ' . A::b;
}
}
$a = new A();
$a->B();
?>
I get a parse error on line 23 with
echo 'foo bar ' . A::b;
But I have to retrieve the property $b from class A FROM the doStuff()
method in Class C...
how do I do that?
Thanx
Phil
?
class A {
function A() {
$b = 'hello world';
}
function B() {
$c = new C();
$c->doStuff();
}
}
class C {
function C() {
$blah = 0;
}
function doStuff() {
echo 'foo bar ' . A::b;
}
}
$a = new A();
$a->B();
?>
I get a parse error on line 23 with
echo 'foo bar ' . A::b;
But I have to retrieve the property $b from class A FROM the doStuff()
method in Class C...
how do I do that?
Thanx
Phil
Comment