Echo in PHP


Prev Tutorial Next Tutorial

Echo in PHP

In php there are two way to get your output is; echo and print.

Print String using echo

Syntax

<?php
echo "<h2>My First PHP Code</h2>";
?>

Output

My First PHP Code

Print Variable value using echo

Syntax

<?php
$str="Hello php"
echo "<h2>My Message: $str</h2>";
?>

Output

My Message: Hello PHP

Prev Tutorial Next Tutorial

Download Projects

Yahoo Advertisements
Free Classified Site – Bedpage

Adsense Ads Advertisements