Try this for a simple way to echo a variable in the midst of your html:
<?= $variable_to_echo ?>
You can also use this to show the return value of a function:
<?= aFunctionThatReturnsText() ?>
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.



