The print() function used to display the output on screen
print ( string $strings ) : int
Parameter Name | Descrption |
---|---|
$strings | Required, the data. |
Returns type is 1
$sting ="Test String"; print $sting; //Output :: Test String //print with html text data print "PHP is scripting language
"; //print without parentheses print "Hello World!"; //print with parentheses print ("Hello World!"); $string1=" Coding"; $string2=" at Qoify.com"; print "Learn ".$string1.$string2; $a=5; $b=7; print $a+$b;
1- print is a language construct, it is not a function, so parentheses are not required.
2- It is a language construct so it can not be called using variable functions
Related Functions