What is echo
Created by: Dr.Ferrous
echo.php is mean?
The echo statement in PHP is used to display the output of a given expression.
You can use the echo statement to display any type of data in PHP. For example numbers, strings, variables or any other expression.
You can see, echo keyword is followed by the string in double quotes. Similarly, you can use a variable name with a $ sign to display the variable value.
You can also echo multiple strings concatenated together. Example:
And here's an example of how to create html tags with echo:
Sometimes, you need to display quotes such as:
In that case, you have to escape the quotes by adding backslash just before each quote. Example:
But if you used double quotes, you don't have to escape the single quotes and vice versa. Example: