I want to do this.
$ppl->tech->ceo->apple();
How would I make that work?
For example:
class ppl {
public $tech;
public function __construct(){
$this->tech = new tech();
}
}
class tech {
public $ceo;
public function __construct(){
$this->ceo = new ceo();
}
}
class ceo {
public function __construct(){
}
public function apple(){
echo 'Hello.. I\'m apple.';
}
}