note 25503 added to language.oop

From: Date: Thu, 26 Sep 2002 04:04:33 +0000
Subject: note 25503 added to language.oop
Groups: php.notes 
Request: Send a blank email to php-notes+get-37259@lists.php.net to get a copy of this message
If anybody could help, I haven't been able to figure this out.. #Keywords class Keywords { var $sKeywords; function SetKeywords($nKeywords){ $this->sKeywords = $nKeywords; } function DispKeywords(){ echo "<meta name=\"keywords\" content=\"".$this->sKeywords."\">"; } } #Title class Title { var $sTitle; function SetTitle($nTitle){ $this->sTitle = $nTitle; } function DispTitle(){ echo "<title>Tnpmx (v7) : ".$this->sTitle."</title>"; } } #Define Class Variables $title = new Title(); $keywords = new Keywords(); #Display Body of Page { #Common Header function cHeader(){ echo "<html>\n<head>\n"; $title->DispTitle(); $keywords->DispKeywords(); @DispStyle(); echo "</head>\n<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n"; @mTop();@mLeft(); } I am trying to have it where I can just do this in each page: <?php include_once('includes/global.php'); $title -> SetTitle("Index"); $keywords -> SetKeywords("Blah"); cHeader();?> Blah <?php cFooter();?> -- http://www.php.net/manual/en/language.oop.php http://master.php.net/manage/user-notes.php?action=edit+25503 http://master.php.net/manage/user-notes.php?action=delete+25503 http://master.php.net/manage/user-notes.php?action=reject+25503

« previous php.notes (#37259) next »