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
Are parent constructors called implicitly inside a class constructor?
How many types of errors in php?
What is good average session duration?
How many ways to include array elements in double-quoted strings using php?
How many types of inheritances used in php and how we achieve it.
Is php easier than javascript?
Write a program to display reverse of any number?
What is the use of mysql_fetch_assoc in php?
Which programming language does php resemble?
How to check if a string contains a character or word in php?
How can we change the value of a constant?
How do you parse and process html/xml in php?
What is the differences between $a != $B and $a !== $B?
What's the difference between accessing a class method via -> and via ::?
What is dao in php?