What is the function of echo | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is the function of echo

Php

14th Apr 2019, 8:35 PM
Zubeyr
Zubeyr - avatar
7 Answers
+ 9
PHP echo Function. In PHP, echo is used to output one or more strings.
14th Apr 2019, 11:32 PM
Danyo Joe Crews Kumi Junior
Danyo Joe Crews Kumi Junior - avatar
+ 6
echo is used to print a string to console
14th Apr 2019, 8:42 PM
D_Stark
D_Stark - avatar
+ 5
Code we must practise and practise
14th Apr 2019, 8:36 PM
Zubeyr
Zubeyr - avatar
+ 5
Try it out 😉 <?php echo "echo is used to print a string to console (@D_Stark )"; ?> Or look here https://code.sololearn.com/wpZUbw9AVDC7/?ref=app
16th Apr 2019, 8:44 AM
Donthack
Donthack - avatar
+ 2
In PHP, echo is used to print a string, number or variables. It doesn't return anything. On the other hand, print is used to print same as echo. But it returns 1. So, we can use print in expressions but not echo.
15th Apr 2019, 3:49 AM
sbkrish
sbkrish - avatar
+ 2
Like print and puts in other languages.
16th Apr 2019, 7:00 AM
Sonic
Sonic - avatar
+ 1
In PHP we use echo to give an output, like as print in JS
16th Apr 2019, 8:07 AM
Abhishek Anand
Abhishek Anand - avatar