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

How to convert one date format into another in php?

959


What is an abstract class in php?

1030


What does the function get_magic_quotes_gpc() means?

989


What is an anti csrf token?

978


Is php dying 2018?

1004


How to get complete current page url in php?

1114


What is session data?

1023


What distinguishes php from something like client side java script?

1091


What is php rest api?

1070


Which function would you use to merge two arrays in php?

1030


Does php support multithreading?

1109


Explain Traits in PHP?

1003


Is empty check in php?

1102


Does session expire on closing browser?

951


How many php functions are there?

1158