PHP print() function

The print() function used to display the output on screen

Syntax

print ( string $strings ) : int

Parameters

Parameter Name Descrption
$strings Required, the data.

Return Value

Returns type is 1

print() examples

$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;