Answer Posted / nimesha
Print_r will display only values,but var_dump will display
data types too
Eg :
<?php
$a = array('aaa','bbb',11);
?>
Output of var_dump :
array(3) { [0]=> string(3) "aaa" [1]=> string(3) "bbb"
[2]=> int(11) }
Output of print_r :
Array ( [0] => aaa [1] => bbb [2] => 11 )
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is include in php?
I need to know about the courses which are useful in corporate companies.. especially php/mySQL, Java/j2ee, .NET.. also tell if any other courses are valuable
Which function can be used to exit from the script after displaying the error message?
Tell me what are the correct and the most two common way to start and finish a php block of code?
What are the advantages of triggers?
When viewing an html page in a browser, the browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
What is the difference between php 5 and php 7?
Why php is used?
Which will check if a function exists?
How does csrf attack work?
Is empty array php?
Distinguish between urlencode and urldecode?
What does nan stand for computer science?
How to declare an array in php?
Explain me what is x+ mode in fopen() used for?