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

What is a static method php?

1046


What is pdo classes?

1206


Which is better python or php?

1046


Which is better session or cookie?

1007


Can you give example for trait in php?

1061


What is the function mysql_pconnect() usefull for?

1177


Which function is used in php to check the data type of any variable?

997


What is the expansion of LAMP?

1104


How can you get the size of an image in PHP?

1052


How many types of inheritances used in php and how we achieve it.

997


What does mvc stand for and what does each component do?

1158


What is fetch array in php?

1165


How do you put a space in html?

1056


What is the w3c?

8986


Can we learn php without html?

1035