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

Explain about objects in PHP?

0 Answers  


Is it easy to learn wordpress?

0 Answers  


Can I use php in visual studio?

0 Answers  


Apart from mail() function to send emails,is there any other functions in PHP to send emails?

4 Answers  


What is php mainly used for?

0 Answers  






What is a stored procedure in mysql?

0 Answers  


What is $row in php?

0 Answers  


What is the difference between get and post method in php?

0 Answers  


What is the goto statement useful for?

0 Answers  


Explain why would we use === instead of ==?

0 Answers  


How to make a file encrypt and decrypt?

4 Answers   3i Infotech,


Can php replace javascript?

0 Answers  


Categories