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
Written by Tiago Almeida
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Did you know?
PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#