1.What are the difference between echo , print , print_r ?
else this 3 can we show output to a client in some other
way?
Answer Posted / ramesh
echo is not a function only it is display String Or integer Values
echo $record;
Array
print is a function it display the string and integer values it not applicable for loops and arrays
print($record);
Array
print_r is a return function it used for Strings and integers and as well as array of values and return object values
do u want effective retriview data from arrays use below statement
print_r($record);
Array ( [id] => 0 [date_details] => [password] => dasf [email] => sdfhhh )
echo "<pre>"; print_r($record);echo "</pre>";
Array
(
[id] => 0
[date_details] =>
[password] => dasf
[email] => sdfhhh
)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the role of the .htaccess file in php?
Will react hooks replace redux?
Explain the difference between php4 and php5.
What does the scope of variables means?
What is final in php?
How can we connect to a mysql database from a php script?
What is the static variable in function useful for?
What is the use of strip_tags() method?
Name some of the constants in php and their purpose.
How do you explain independent and dependent variables?
What is the w3c?
How can we set and destroy the cookie in php?
What is php artisan tinker?
How to check an element is exists in array or not in php?
Swap two variables value without using third variable in php ?