Last Updated: September 09, 2019
·
529
· nikebot

PHP echo tip

Tired of doing <?php echo $foo; ?> ?<br>

Just do <?= $foo; ?> and it will echo the $foo variable!

<br>


<? and <?= are called short open tags, and are not always enabled (see the short open tag directive) with PHP 5.3 or below (but since PHP 5.4.0, <?= is always available).<br><br>
see reference