echo
- echo is a statement i.e used to display the output. it can be used with parentheses echo or without parentheses echo.
- echo can pass multiple strings separated as ( , )
- echo doesn’t return any value
- echo is faster then print
Example-2
For Example (pass multiple arguments)
- Print is also a statement i.e used to display the output. it can be used with parentheses print( ) or without parentheses print.
- using print can doesn’t pass multiple argument
- print always return 1
- it is slower than echo
Example:1
For Example (pass multiple arguments with print keyword)
PHP Fundamental Tutorials with Basic Demo by Chentan in 2020 – Part-1
PHP Fundamental Tutorials with Basic Demo by Chentan in 2020 – Part-2
Latest posts by sam (see all)
- AJAX Crud with laravel 5.8 - October 29, 2021
- Upload image in the database with local folder and image send mail. - October 23, 2020
- How to protect .env file in Laravel. - September 10, 2020