print() function in php
0 2007
PHP print() function is used to output one or more strings. It is an inbuilt function of PHP. The working of the print() is the same as the working of echo() function but it is slower than echo() function.
The return type of this function is a string.
Syntax:
print($string);
In case of more than one string, use this function without parenthesis.
print $string1.$string2;
here,
$string, $string1 and $string2 are PHP strings
Example 1:
<?php $string="Welcome to Coding Tag"; print($string); ?>
Output:
Example 2:
<?php $string1="Welcome to "; $string2="Coding Tag"; print $string1.$string2; ?>
Output:
Share:
Comments
Waiting for your comments