Outputting Data to the Browser

The print() Statement

The print() statement outputs data passed to it to the browser. Its prototype looks
like this:

int print(argument)
All of the following are plausible print() statements:
<?php
    print("<p>I love the summertime.</p>");
?>

<?php
    $season = "summertime";
    print "<p>I love the $season.</p>";
?>

<?php
    print "<p>I love the
    summertime.</p>";
?>

All these statements produce identical output:


I love the summertime.

Comments