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
Which function gives us the number of affected entries by a query?
Is multiple inheritance supported in php?
What is rest api in php?
Which is the best php framework for a beginner?
How do I stop a php script?
What is the function to count elements in an array in PHP?
What is basename php?
Is nan in php?
Tell me what are the different types of errors in php?
How can you propagate a session id?
Where is the submitted form data stored?
How to retrieve values out of an array?
Tools used for drawing er diagrams?
What is member variable?
What is a PHP Filter?