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
Which is the best php framework for a beginner?
Why do you need to filter out empty files?
How to terminate the execution of a script in PHP?
What is the difference between $var and $$var?
Does session expire on closing browser?
How is it possible to parse a configuration file?
What is use of echo in php?
What does isset() function?
Tell me in php, objects are they passed by value or by reference?
What does the initials of php stand for?
What is php in simple words?
What is the interface in php?
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
When use javascript vs php?
How to enable cURL in PHP?