potresti ad esempio avere un file di "template" contenente tutto il layout, e una parola chiave come segnaposto; ad esempio

codice:
<!DOCTYPE
 html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><title>Titolo</title></head>
<body>
<div id="main">
	%%CONTENT%% 
</div>
</body>
poi carichi il file di template in una stringa con $template = file_gets_content('/percorso/file');
e rimpiazzi alla parola chiave il contenuto


Codice PHP:
<?php str_replace('%%CONTENT%%'$contenuto_del_form$template); ?>
ciao