Jump to content

How do I call a class->function()?


Perad

Recommended Posts

this sample class code :

<?php
class Page {
   var $Title;
   var $Keywords;
   var $Content;

   function Display( ) {
     echo "<HTML>\n<HEAD>\n";
     $this->DisplayTitle( );
     $this->DisplayKeywords( );
     echo "\n</HEAD>\n<BODY>\n";
     echo $this->Content;
     echo "\n</BODY>\n</HTML>\n";
   }

   function DisplayTitle( ) {
     echo "<TITLE>" . $this->Title . "</TITLE>\n";
   }

   function DisplayKeywords( ) {
     echo '<META NAME="keywords" CONTENT="' . $this->Keywords . '">';
   }

   function SetContent( $Data ) {
     $this->Content = $Data;
   }
}
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.