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:
{code type=php}
= $variable_to_echo ?>
{/code}
You can also use this to show the return value of a function:
{code type=php}
= aFunctionThatReturnsText() ?>
{/code}
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.