Inheritance-problem
| From: | Martin | Date: | Mon, 21 Aug 2000 10:12:26 +0000 |
| Subject: | Inheritance-problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-12745@lists.php.net to get a copy of this message | ||
Hi !
Imagin the following class structure:
class A
{ var $MyVar = 1;
function Output()
{ print $this->MyVar;
}
}
class B
{ var MyVar = 2;
function AnotherFunc()
{ Output();
}
}
The output will be "2". But in "class A" I want to get access to
A::MyVar (as it would be in C) -> "1". How it it done ?
Regards
Martin