Singleton Example

go here <?php class DatabaseConnection{ private $handle=null; private function __construct(){ $this->handle="pp"; //create mysql connection here /* $this->handle=mysqi_connect('host','username','pass','dbname'); if(mysqli_connect_errno){ echo "error in connecting to mysql". mysqli_connect_errno(); exit(); } */ } public static function get(){ static $db=null; if($db==null){ echo "class object initialize single time"; $db=new DatabaseConnection(); } return $db; } public function gethandle(){ return $this->handle; } } $dbobj=DatabaseConnection::get()->gethandle(); print_r($dbobj); $dbobj=DatabaseConnection::get()->gethandle(); print_r($dbobj);

http://hosnaboen.no/?misoloie=single-svenske-menn&bc9=69 Output – class object initialize single timepppp

dating your dead husband's brother

http://fbmedical.fr/aftepaes/7682