PHP print Keyword

❮ PHP Keywords

Example

Output some text:

<?php
print "Hello World!";
?>
Try it Yourself »

Definition and Usage

The print keyword is used to output text.

Unlike echo, print can only output one string at a time. Unlike echo, print has a return value, which is always 1.


Related Pages

The echo keyword


❮ PHP Keywords
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.