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

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements