Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- class Editables {
- public $title;
- public $subtitle;
- public $content;
- public $friendlyName;
- public function __construct ($title, $subtitle, $content, $friendlyName) {
- $this->title = $title;
- $this->subtitle = $subtitle;
- $this->content = $content;
- $this->friendlyName = $friendlyName;
- }
- public function write() {
- $str .= "<h1>{$this->title}</h1>";
- $str .= "<h2>{$this->subtitle}</h2>";
- $str .= "<p>{$this->content}</p>";
- $str .= "Friendly name: ";
- $str .= "{$this->friendlyName}";
- echo "$str";
- }
- }
- $editable1 = new Editables ("My First Editables", "Let's give this a try.", "This is my first editable. It is awesome and long. I can do whatever I want inside of it. Look at it go.", "FirstEditables.php");
- $editable1->write();
- ?>
Add Comment
Please, Sign In to add comment