class Database
{
public static $_instance;
public static function getInstance()
{
if(!isset(self::$_instance))
self::$_instance = new Database(DB_SERVER, DB_USER,
DB_PASS, DB_NAME);
print_r(self::$_instance);
return self::$_instance;
}
}
can any one explain "self::$_instance = new
Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);" this line
Answer / guest
self::$_instance = new
Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
It represents object creation of the class 'Database'.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is php compared to html?
How can we create a database using PHP and mysql?
4 Answers Rushmore Consultancy,
Is php an oop?
What is uniqid php?
What is a PHP Filter?
What is php date function?
Explain me how to include a file to a php page?
Does mysql need php?
How send email in php?
Where do we use get and post?
What is trait in php?
please send me the interview questions and answers to my mail id : srikanthgovardana@yahoo.com or srikanthgovardana@gmail.com