PHP Print

The PHP print Statement

The print statement can be used with or without parentheses: print or print().

Display Text

The following example shows how to output text with the print command (notice that the text can contain HTML markup):

Output:

PHP is Fun!

Hello world!
I’m about to learn PHP!

PHP print: printing variable value

The following example shows how to output text and variables with the print statement:

Output:

Learn PHP

Study PHP at mywebcode.com
9

Leave a Comment