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

Echo () PHP Function

By , About.com Guide

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

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. 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.