Simple Shortcut to PHP echo - Keep it Neat and Tidy

Try this for a simple way to echo a variable in the midst of your html:

<?= $variable ?>

You can also use this to show the return value of a function:

<?= aFunction() ?>

This requires the php directive short_open_tag to be set to 1 (done via php.ini or .htaccess). Most hosts will have this set to 1 by default although there are some that will stop this altogether - keep this in mind if your code is to be widely used.

Are you a Developer, Designer or Copy Writer? Or Looking For One?

Click here to see 100s of jobs updated every day that you can complete to earn good money. Also find that programmer, designer or copy writer you have been looking for - advertise and get the best guy for your job - click here to find out more

Leave a Reply

Make $100,000/Month - Every Month!

It Works! We Make Our Customers Millionaires! Act now and get $600 bonus and a Free Money Making Website! - click to get started