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

write a program to print [123] [456] [789] note : braces also need to be printed

2 Answers   Net Solution,


How can I add text to an image?

1 Answers   IPSR Solutions, Rushmore Consultancy,


How to turn on the session support in php?

0 Answers  


how to track user logged out or not? when a user is idle?

0 Answers  


Define urlencode() and urldecode() used in php?

0 Answers  


What are the uses of explode() function?

0 Answers  


How to make database connection in php?

0 Answers  


What is the purpose of the '.myd' file extension? What do thes file contain?

0 Answers  


What is the purpose of php?

0 Answers  


What is crypt () in php?

0 Answers  


Why do we use sessions in php?

0 Answers  


How to uploaded files to a table?

0 Answers  


Categories