Php echo
From w3cyberlearnings
Contents |
PHP function echo
This function outputs string. It is not a real function and it doesn't require parentheses when use it.
Syntax echo
- string: string input
echo "string";
Example 1
<?php echo "Spring lake of Texas!"; ?>
Output
Spring lake of Texas!
Example 2
<?php $str="Hommy"; echo "I want to tell you about {$str} "; ?>
Output
I want to tell you about Hommy
Example 3:Multiple lines with echo
<?php echo <<<GHTML <p>Peace and happiness</p> Girl is great for the house-work as all men.<br/> GHTML; ?>
Output
Peace and happiness Girl is great for the house-work as all men