Echo in PHP
Advertisements
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
Google Advertisment