Give small demo of writting OOP in PHP-mysql.



Give small demo of writting OOP in PHP-mysql...

Answer / 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

More PHP Interview Questions

Tell me how would you declare a function that receives one parameter name hello?

0 Answers  


What is str_replace()?

0 Answers  


What is Different between Joomla And Magento?

0 Answers  


What is php full form?

0 Answers  


Tell me what should we do to be able to export data into an excel file?

0 Answers  






What is the name of the scripting engine that powers PHP?

0 Answers  


What is the use of trim in php?

0 Answers  


Which of the data type is compound datatype supported by PHP?

0 Answers  


Explain what does the unset() function means?

0 Answers  


Who is the father or inventor of php?

0 Answers  


How do you end a function in python?

0 Answers  


Which php framework is best for web development?

0 Answers  


Categories