Answer Posted / prakash1991
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 |
Post New Answer View All Answers
How to include a file to a PHP page?
What is the use of the function htmlentities?
Where is the submitted form data stored?
What is the use of hooks?
What is the difference between laravel and php?
How many types of array supported in php?
How do I sort numbers in php?
Describe the security vulnerability of PHP?
Which operator is used to concatenate two strings in PHP?
When do you use define() and when do you use const. What are the main differences between those two?
What are the different types of php variables?
What is the function mysql_pconnect() useful for?
What is restful api?
Can php run without server?
How to open a file in php?