Php print
From w3cyberlearnings
Contents |
PHP function print
This function outputs string, and it is similar to echo, but it is not really a function and when use it no need to use parentheses with it. print() function is slower than echo() function.
Syntax print
- string: string input
print "string";
Example 1
<?php print "Spring lake of Texas!"; ?>
Output
Spring lake of Texas!
Example 2
<?php $str="Hommy"; print "I want to tell you about $str "; ?>
Output
I want to tell you about Hommy
Example 3
<?php print <<<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