wget is a *nix program ( thought might be available for Windows too ) which mirrors webpages and websites. You could use that.
You could also use ob_start(), ob_get_contents(), and ob_end_clean() to store the contents all your output ( print, echo, etc. statements ) into a variable, and then fopen, fwrite, and fclose those contents to a static HTML file.
-- start of file --
ob_start();
// all the contents of your page here
$OUTPUT = ob_get_contents();
ob_end_clean();
$fp = fopen ($_SERVER['PHP_SELF'] . ".html", "w");
fwrite ($fp, $OUTPUT);
fclose ($fp);
-- end of file --
Thats completly psudocode, untested. But you get hte idea.