PHP echo Keyword
Definition and Usage
The echo
keyword is used to output one or
more strings.
The echo
keyword has no return value.
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, whileprint
has a return value of 1 so it can be used in expressionsecho
can take multiple parameters, whileprint
can take one argumentecho
is marginally faster thanprint
More Examples
Related Pages
The print
keyword
❮ PHP Keywords