// pub.class.php abstract class Publications { protected $publication_id ; protected $co_id ; protected $coName ; protected $webEmailLink ; protected function __construct( ) { print "In BaseClass constructor\n"; } public function Set_publication_id($value) { $this->publication_id = $value; } protected function Get_publication_id() { return $this->publication_id ; } protected function Set_co_id($value) { $this->co_id = $value; } protected function Get_co_id() { return $this->co_id ; } protected function Set_coName($value) { $this->coName = $value; } protected function Get_coName() { return $this->coName ; } protected function Set_webEmailLink($value) { $this->webEmailLink = $value; } protected function Get_webEmailLink() { return $this->webEmailLink ; } } class Issues extends Publications { protected $issue_id ; protected function __construct( ) { print "In SubClass constructor\n"; } protected function Set_issue_id($value) { $issue_id = $value; } protected function Get_issue_id() { return $issue_id ; } protected function PrintIssueDetails() { echo ( $this->publication_id . " - " . $this->co_id. " - " . $this->coName . " - " . $this->webEmailLink ) ; } } //END // another.php Set_publication_id(45); var_dump ( $myIssue[0] ) ; echo "
"; $myIssue[0]->PrintIssueDetails(); ?>