Ben Stones a écrit :
Hope I have made myself as clear as possible!
I did'nt understand what you mean, but I guess you're seeking for the
parent keyword. Read again the PHP manual about OOP.
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General Mailing List
Hi, maybe if I post below what I'm trying to do it may make more sense:
class myClass {
public function func() {
$hello = Yay!!;
}
}
class otherClass extends myClass {
public function otherFunc() {
echo parent::func();
}
}
class myClass {
public function func() {
return Yay!!;
}
}
class otherClass extends myClass {
public function otherFunc() {
echo $this-func();
}
}
$class=new otherClass();
echo $class-otherFunc();
oh yes, it's that simple.
2
Maciek Sokolewicz schreef:
class myClass {
public function func() {
return Yay!!;
}
}
class otherClass extends myClass {
public function otherFunc() {
echo $this-func();
}
}
$class=new otherClass();
echo $class-otherFunc();
oh yes, it's that simple.
2 things to
4 matches
Mail list logo