Javatpoint Logo
Javatpoint Logo

PHP Print

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:

PHP print statement can be used to print string, multi line strings, escaping characters, variable, array etc.

PHP print: printing string

File: print1.php


Hello by PHP print Hello by PHP print()

PHP print: printing multi line string

File: print2.php


Hello by PHP print this is multi line text printed by PHP print statement

PHP print: printing escaping characters

File: print3.php


Hello escape "sequence" characters by PHP print

PHP print: printing variable value

File: print4.php


Message is: Hello print() in PHP
Next TopicPHP Variables

Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA