This is partially a philosophical discussion. I, for example, am used to work with external HTML templates which are processed by PHP code that is completely free of any presentational code - no echo, no print etc.
The 'drawback' is supposedly speed, which of course depends on your host. Loading the template and processing it will take longer than just echoing out HTML code.
In my case the servers are powerful enough that templating has no adverse effect on the performance, it's still fast.
It also has been suggested that the PHP interpreter processes code which has context switching less efficient (sleipnir214 profiled that somwhere...). Putting PHP command interspersed with HTML will slow the whole thing also.
On option, however, is to use large chunks of HTML with a echo/print statement using the HEREDOC syntax. It allows for 'plain' HTML, no escaping of quotes etc. necessary but variable interpolation is still available. For example what bastien suggested could be part of a heredoc portion:
Code:
print <<<END
<form name="myform" method="post" action="{$_SERVER['PHP_SELF']}">
<input type="text" name="fname" value="$fname">
<!-- etc. -->
END;
# PHP code continues, the context has not been switched ...
$whatever = function($arg);
In terms of maintenance I fully subscribe to the template/code separation philosophy.