The code snippet below shows how to simply display Copyright in your webpage…
<?php
/*
|---------------------------
| Author: Evin Weissenberg
|---------------------------
*/
class Copyright_Display {
private $company_name;
private $utf8;
function __constructor() {
$this->utf8 = ini_set('default_charset', 'UTF-8');
}
function setCompanyName($company_name) {
$this->company_name = (string)$company_name;
return $this;
}
function __get($property) {
return $this->$property;
}
function render() {
$copyright = "Copyright © " . date('Y') . " " . $this->company_name;
return $copyright;
}
function __destructor() {
unset($this->utf8);
}
}
$c = new Copyright_Display();
$c->setCompanyName('ACME LLC')->render();
/*
|---------------------------
| Author: Evin Weissenberg
|---------------------------
*/
class Copyright_Display {
private $company_name;
private $utf8;
function __constructor() {
$this->utf8 = ini_set('default_charset', 'UTF-8');
}
function setCompanyName($company_name) {
$this->company_name = (string)$company_name;
return $this;
}
function __get($property) {
return $this->$property;
}
function render() {
$copyright = "Copyright © " . date('Y') . " " . $this->company_name;
return $copyright;
}
function __destructor() {
unset($this->utf8);
}
}
$c = new Copyright_Display();
$c->setCompanyName('ACME LLC')->render();
All PHP Scripts on this website are provided by phpscripts4u.com where you can find all the latest PHP code snippets, plugins and libraries.