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
What is namespace in php?
What is explode() in php?
Tell me which programming language does php resemble to?
What are the rules to determine the “truth” of any value which is not already of the boolean type?
How is it possible to cast types in php?
What does it mean when it says the csrf token is invalid?
How do you debug php?
What is isset in php form?
Can we use include ("xyz.php") two times in a php page "index.php"?
Tell me what is the use of "ksort" in php?
How long will it take to learn php?
What is the difference between overloading and overriding in php?
How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain
Write syntax to open a file in php?
What are the benefits of using php?