Tag Archives: php echo statement

PHP echo and print statement

003 – PHP echo and print statements

In PHP the echo and print statements are two basic ways of getting output.

They both output data on the screen but there are three small differences between them.

  • The echo statement has no return value while the print statement has a return value of 1, so it can be used in expressions.
  • The echo statement in PHP is a little bit faster than the print statement.
  • The echo can take multiple parameters while the print statement can take only one.

Continue reading