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
What is the difference between apache vs niginx?
Which method do you follow to get a record from a million records? (Searching not from database, from an array in php)?
How to write the form tag correctly for uploading files?
Which php framework is fastest?
How do you pass a variable by value in php?
What are the main error types in php and how do they differ?
Php code to find whether a number armstrong or not?
How is csrf token generated?
What does the unlink() function mean?
Do you know what's the difference between __sleep and __wakeup?
How do I check if a given variable is empty?
What are the delimiters in php?
Explain me what are the 3 scope levels available in php and how would you define them?
Why json is used in php?
Is php better than java?