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 a static method php?
What is pdo classes?
Which is better python or php?
Which is better session or cookie?
Can you give example for trait in php?
What is the function mysql_pconnect() usefull for?
Which function is used in php to check the data type of any variable?
What is the expansion of LAMP?
How can you get the size of an image in PHP?
How many types of inheritances used in php and how we achieve it.
What does mvc stand for and what does each component do?
What is fetch array in php?
How do you put a space in html?
What is the w3c?
Can we learn php without html?