PHP echo and print Statements
To display the output we frequently use the echo statement. There are two basic ways to get the output in PHP.
- echo
Difference between echo and print:
echo | |
---|---|
Multiple arguments
You can pass multiple arguments separated by a comma (,) in echo. It will not generate any syntax error.
It will generate a syntax error because of multiple arguments in a print statement.