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...

Different between the var_dump() and print_r()?

Answer Posted / rubina

The difference between the two is:
Var_dump() returns the datatype also of the variable which
print_r() does not.

Eg:
$query="Select fname from table where id=20";
$result=mysql_query($query);
$row=mysql_fetch_row($result);

print_r($query);
o/p
---------------
SELECT fname FROM information where id=53

var_dump($query);
o/p
----------------
string(43) " SELECT fname FROM information where id=53"

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is default session time and path in php?

1060


Explain the advantages of using PHP?

1012


Tell us how to create an array of a group of items inside an html form?

978


How can we determine whether a php variable is an instantiated object of a certain class?

949


How to get a total number of elements used in the array?

994


How long will it take to learn php?

980


What is difference between rest api and restful api?

984


Is php a framework?

959


Differences between get, post and request methods ?

973


What is better .net or php?

1008


Is it difficult to learn php?

953


Is PHP an open source software?

1062


How many keywords are there in php?

1129


What are the new features available in php 7?

998


Are parent constructors called implicitly inside a class constructor?

951