What is the Diff. Between echo() and Print() in PHP?
Answer Posted / satyajit das
1> print()is am method which returns boolean parameter(s)
either 1 or 0. Where echo() is an object rather statement
which does not have any return parameter in spite of has
its functionality.
2> According to print is structured and faster in sence it
does not return any complex parameter but if the complex
parameter is concerned echo becomes slow. complex parameter
indicates any complex value like 1.3e^2.
3> print supports multiple arguements w.r.t. '.' like echo
e.g.
<?php
$p = "MY ISAM";
$j = 1;
print($p." ".$j);
echo("<br>".$p.$j);
?>
Is This Answer Correct ? | 20 Yes | 23 No |
Post New Answer View All Answers
What is the current php version?
What is php and its advantages?
How long should a session last?
What do the initials of php stand for?
Which MySQL function would you use to select a database?
Is salary fixed or variable cost?
What is an array in php?
what is CURL?
How to calculate the difference between two dates using php?
What are session variables in php?
What is the importance of "action" attribute in a html form?
How to check curl is enabled or not in PHP
What is the use of htmlspecialchars in php?
Is it more secure to use cookies to trfer session ids?
Which is better get or post method?