echo

echo -- Output one or more strings.

Description

echo(string arg1, string [argn]... );

Outputs all parameters.

Echo() is not actually a function (it is a language construct) so you are not required to use parantheses with it.

Example 1. Echo() example

  1 
  2 echo "Hello World";
  3 
  4 echo "This spans
  5 multiple lines. The newlines will be 
  6 output as well";
  7 
  8 echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
  9       

Note: In fact, if you want to pass more than one parameter to echo, you must not enclose the parameters within parentheses.

See also: print(), printf(), and flush().