Thanks,
Daniel Tate.
I think the following should work (in PHP4 only):
================================
<?
// INSERT THIS BLOCK AT THE TOP OF THE FILE
ob_start();
?>
<html><body><? print("Hello!") ?></body></html>
<?
// INSERT THIS BLOCK AT THE BOTTOM OF THE FILE
$filename = "whatever.html";
$fp = fopen($filename, "w");
$out = ob_get_contents();
fwrite($fp, $out, strlen($out));
fclose($fp);
ob_end_clean();
?>
================================
JL