What is the Diff. Between echo() and Print() in PHP?
Answer Posted / surendra.kandimalla
Echo:echo as a function we can pass only one argument.But echo as command we can pass any number of arguments.echo will not return anything.
echo("echo as function<br>");
echo"arg1","arg2","arg3","<br>";
Print:we can pass only one argument for print as function or command.print returns boolean value.
print("print function<br>");
$b=print"print command<br>";
echo $b,"<br>";
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why do we use polymorphism in php?
What does the expression exception::__tostring means?
Does https prevent csrf?
Explain briefly about a search-friendly site looks like?
Is null in php?
Is laravel frontend or backend?
What is strlen php?
Explain about PHP cookies?
So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?
Write a query to find the 2nd highest salary of an employee from the employee table?
What are php keywords?
What is variable and data type?
What is c++ polymorphism?
Can I run php without xampp?
What is a php namespace?