PHP Echo

PHP Echo Features

  • it is a language construct so you are not required to use parentheses with it
  • Therefore always uses parenthesis if you want to use more than one parameters.
  • you know, echo not construct a function
  • PHP Echo is a language.
  • Always PHP echo statement can be used to print a string, multi-line strings, escaping characters, variable, array etc.

php echo

PHP Echo used to print string

File: string.php

Output:

PHP Echo printing multiline string

File: multilinestring.php

Output:

Printing escaping characters
File: echoprint.php

Output:

Printing variable value
File: variableecho.php

Output:

 

Resource
PHP.Net