PHP Print statement
Like PHP echo, PHP print is a language construct, so you don't need to use parenthesis with the argument list. Unlike echo, it always returns 1.
The syntax of PHP print is given below:
- int print(string $arg)
PHP print statement can be used to print string, multi line strings, escaping characters, variable, array etc.
PHP print: printing string
File: print1.php- <?php
- print "Hello by PHP print ";
- print ("Hello by PHP print()");
- ?>
Output:Hello by PHP print Hello by PHP print()