What you could do is have 2 functions in an include:
Example:
template.inc.php
function html_header() {
echo "";
echo "</body>;
}
function html_footer() {
echo "</body>";
echo "";
}
Now just include template.inc.php in your file and call html_header() to print the header and html_footer() to print the footer.
Derek C.