+ 2
What is the difference between "echo" and "print" in php?
6 Answers
+ 4
Hi,
echo and print are more or less the same. They are both used to output data to the screen. The differences are small: echo has no return value while print has a return value of 1 so it can be used in expressions. echo can take multiple parameters (although such usage is rare) while print can take one argument.
+ 2
Echo is statement but print is function so echo can't return while print can
0
important difference is echo can not output array data .. but print can
- 1
difference
- 1
Echo can print but print can't echo. ;)
- 3
There is no difference