Hi, Is this a good way ? <? class main{ var $mysql; var $user; function main(){ $this->mysql=new mysql(); $this->user=new user(); } } class Mysql { function x(){ return "Some Query Result for ";} } class user { var $username; function user(){$this->username="Guest";} } /* Other subclasses */ class Data extends main{ function getText(){ echo $this->mysql->x(); echo $this->user->username; } } $class=new main(); $data=new Data(); $data->getText(); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php