PHP - Print


PHP Print

Like PHP echo, PHP print is a language construct, as a result, you don't obsession to use parenthesis gone the objection list. Unlike echo, it always returns 1.

The syntax of PHP print is given below:

int print(string $arg)  

PHP print messages can be used to print a string, multi heritage strings, escaping characters, adaptable, array, etc.

PHP print: printing a string

<?php
  
print "Hello Advance PHP by Tutorials Wave ";  
print ("Tomorrow is Monday ");  

?>  

The output of the above code :

Hello Advance PHP by Tutorials Wave Tomorrow is Monday

 

PHP print: printing multi-line string

<?php  

print "Hello by Tutorial Wave 
you are all welcome  
to our tutorials   
portal";  

?>  

The output of the above code :

Hello by Tutorial Wave 
you are all welcome  
to our tutorials   
portal

<< Prevoius Next >>