1. Home
  2. Computing & Technology
  3. PHP / MySQL

Echo () PHP Function

By Angela Bradley, About.com

Definition: The echo () function is used to output the given argument. It can output all types of data and multiple outputs can be made with only one echo () command.

Do you use PRINT or ECHO in your PHP code? Share your answer!

Examples:
<?php
Echo "Hello";
//Outputs a string
Echo $variable;
//Outputs a variable
Echo "Multiple things " . $on . " one line";
//Outputs a string, then a variable, then a string. All are separated with a [.] period
?>
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Echo PHP - PHP Echo - PHP Echo Function

©2009 About.com, a part of The New York Times Company.

All rights reserved.