Home » PHP print() function

PHP print() function

by Online Tutorials Library

PHP print() Function

PHP print() function is important function, which is used to output one or more string.

Note: The print() function is not actually a function, so there is no required to use parentheses.

Syntax:

Parameter Description Required/Optional
string Specify one or more string to be sent output. Required

Example 1

Output:

Hello PHP  

Example 2

Output:

Hello PHP!  It is Server Side Scripting Language  

Example 3

Output:

Hello PHP! PHP is server side scripting language  

Example 4

Output:

JOHN is 35 years old.  

Next TopicPHP String

You may also like