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
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
How can we check the value of a given variable is a number?
How can we get the error when there is a problem to upload a file?
What is better .net or php?
How does the identity operator === compare two values?
What are the steps for the payment gateway processing?
Explain type casting and type juggling.
How to track no of user logged in?
Explain php split() function.
What is env in laravel?
Difference between get and post method.
What is the use of pear in php?
What is the function of trim?
Is php used for frontend or backend?
Is ruby on rails php?