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
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
Does php pass arrays by reference?
How does session work in php?
What is the functionality of the functions strstr() and stristr()?
What are the correct and the most two common way to start and finish a PHP block of code?
What is the best website to learn php?
"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.
What are the different ways to login to a remote server?
What are classes in php?
What is a query in php?
Explain about getters and setters in php?
Why should I learn php?
Does https prevent csrf?
how retrive the video file in php using video tag
What is fetch array in php?