PHP Tutorial > String Functions > echo
In PHP, echo is used to output one or more strings. Even though echo behaves like a string function, it is technically not a function, as it doesn't require a parenthesis.
The syntax of the echo construct is:
where [string] means one or more strings.
Let's take a look at the examples below:
echo 'You are reading a tutorial on PHP echo construct.';
You are reading a tutorial on PHP echo construct.
$var = 'Learn PHP';
echo 'This shows ' . 'how echo can ', 'be used to concatenate a string.';
This shows how echo can be used to concatenate a string.
Next: PHP explode Function