class bm_main {
public $db;
public function __construct(){
$this->db = new db();
}
}
class bm extends bm_main{
public function __construct($id){
$this->db = parent::$db;
$this->db->save($id);
}
}
How to access the $db object from parent class so i can use it in the child one