You always have to reference php variables in side of <? and ?>, so what your looking for is something like this:
<?
some php code
$var = "hello";
?>
some html code
<?=$var?>
<?= instructs php to automaticly echo whats inside the tag, and is the same as doing: <? echo $var; ?>
There's no way around this. If you don't open up the tag, i.e. <? and close it, php will not know it's supposed to parse the code.