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 |
Why and where do we use htaccess?
Why do we use in php?
What is $_ server request_method == post?
programm for factorial
What is composer install?
What is the function of mysql_real_escape_string in php?
How is the ternary conditional operator used in php?
Tell me what types of loops exist in php?
What distinguishes php from something like client side java script?
What is properties of class?
What is api example?
Which is not a file-related function in php?