PHP 7.2.0 Release Candidate 2 Released

Voting

Please answer this simple SPAM challenge: min(five, zero)?
(Example: nine)

The Note You're Voting On

josh at PraxisStudios dot com
12 years ago
As with echo, you can define a variable like this:

<?php

$text
= <<<END

<table>
    <tr>
        <td>
            
$outputdata
        </td>
     </tr>
</table>

END;

?>

The closing END; must be on a line by itself (no whitespace).

[EDIT by danbrown AT php DOT net: This note illustrates HEREDOC syntax.  For more information on this and similar features, please read the "Strings" section of the manual here: http://www.php.net/manual/en/language.types.string.php ]

<< Back to user notes page

To Top