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
Is it possible to destroy a cookie?
Explain about the connective abilities of the PHP?
Is php a programming language?
What is htmlspecialchars?
What is prepare in php?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
How many php functions are there?
How check variable is set or not in php?
How to swap two variables without using 3rd temp variable.
What is the difference between super () and this ()?
What is the role of php?
What is $_ get?
What is meant by urlencode and urldecode?
Which programming language does php resemble?
What is php constructor?