Give small demo of writting OOP in PHP-mysql.
class class_name extends base_class
{
function function_name()
{
// call base class function
$this->base_class_function();
// function body
}
}
call the function from out side whenever you use
//include the php file where you write the class
include_once 'class_file.php';
$variable_name = new class_name()
// set the variable value that you want to use in function
$variable_name->class_Variable = "";
//call the function
$variable_name->function_name();
| Is This Answer Correct ? | 0 Yes | 0 No |
Is it worth learning php in 2019?
What is the role of the .htaccess file in php?
What are the disadvantages of php?
How to pass an argument to a function?
What is pdo in php why use?
Tell me what is use of in_array() function in php?
How a constant is defined in a php script?
hi..this is kumar...how m,uch time req for php preparation?is any coaching avaiable in vizag for php?
Explain type casting and type juggling.
Inside a php function, what param needs to be set in order to access a global variable?
How to retrieve the original query string?
What are php variables?