note 13795 added to language.variables.php
| From: | matt at techboost dot com | Date: | Tue, 03 Jul 2001 17:44:20 +0000 |
| Subject: | note 13795 added to language.variables.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14940@lists.php.net to get a copy of this message | ||
I have found a new way of printing variables that is not covered in the manual and I have never
heard this being talked about. It's much like an ASP feature.
Instead of doing this:
<?php
$variable = "test";
echo("$variable");
?>
You can do
<?php
$variable = "test";
?>
<?= $variable ?>
This is especially valuable if you are mixing the PHP with a lot of HTML and closing PHP tags a lot.
http://www.php.net/manual/en/language.variables.php