note 52924 modified in language.variables by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 16:07:50 +0000 |
| Subject: | note 52924 modified in language.variables by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142152@lists.php.net to get a copy of this message | ||
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
]
--was--
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).
http://php.net/manual/en/language.variables.php