Ben,
Well, my first look picks out that you don't really need the double quotes around your variables when you are echoing them since they are pure variables and not a string-variable combination
echo "$ebody"; can be changed to echo $ebody; and there shouldn't be a difference.
If you want to literally store the PHP code in the string then you might have to put it between single quotes so it keeps it literally.
$myvar = '<?php echo $myvar; ?>';
rather than
$myvar = "<?php echo $myvar; ?>";
You might need to experiment a little bit with a simpler chunk of HTML/PHP.
Hope that helps a bit
Tim Frank