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

Is it possible to destroy a cookie?

971


Explain about the connective abilities of the PHP?

1006


Is php a programming language?

1027


What is htmlspecialchars?

967


What is prepare in php?

1003


What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?

1056


How many php functions are there?

1060


How check variable is set or not in php?

859


How to swap two variables without using 3rd temp variable.

899


What is the difference between super () and this ()?

1038


What is the role of php?

936


What is $_ get?

952


What is meant by urlencode and urldecode?

1068


Which programming language does php resemble?

936


What is php constructor?

1007