Echo in PHP

echo in PHP
The echo statement can be used with or without parentheses echo or echo() to print the statement(output) .In PHP there are two basic ways to get output: echo and print.
echo behave differently with single quote ‘$a’ and double qoute “$a “

Syntax :
echo ( ” hello”);       echo  ” hello”;
echo ( ‘hello’);         echo ‘ hello’;

To understand take an example of it


echo "<h2>My PHP</h2>";
echo "I am PHP<br>";
echo "My", "string ", "is", "made ", "with many parameters.";

Leave a Reply