Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Give small demo of writting OOP in PHP-mysql.

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


Please Help Members By Posting Answers For Below Questions

How to include a file to a PHP page?

1052


What is the use of the function htmlentities?

1095


Where is the submitted form data stored?

1073


What is the use of hooks?

961


What is the difference between laravel and php?

920


How many types of array supported in php?

971


How do I sort numbers in php?

1043


Describe the security vulnerability of PHP?

1036


Which operator is used to concatenate two strings in PHP?

1034


When do you use define() and when do you use const. What are the main differences between those two?

1056


What are the different types of php variables?

1049


What is the function mysql_pconnect() useful for?

943


What is restful api?

946


Can php run without server?

1035


How to open a file in php?

1069