Back To PHP Classes and Inheritance Index
ecode=1; $this->ename="abcdef"; $this->esalary=10000; $this->edesignation='accountant'; } function eshowdata() { print('ecode of employee is ' . $this->ecode); print('
'); print('ename of employee is ' . $this->ename); print('
'); print('salary of employee is ' . $this->esalary); print('
'); print('designation of employee is ' . $this->edesignation); print('
'); } } class manager extends employee { var $title; function getdata() { employee::egetdata(); $this->title='senior'; } function showdata() { employee::eshowdata(); print('
'); print('title is ' . $this->title); } } $m=new manager; $m->getdata(); $m->showdata(); ?>