I would actually do this in PHP...
I've done several sites by following a process like this:
Build all your pages, relying on PHP, using include(), etc. BUT don't rely on POSTed or GET data, AT ALL.
Ensure that there is one file include()d at the BEGINNING EVERY PAGE, and a second file ( you can leave them empty for now ) included at the END OF EVERY PAGE.
In that beginning file, turn on output buffering with PHP.
At the end file, ob_get_contents(), save it to a file, use PHP_SELF only minus the .php extension, save it as .html instead.
And there ya go, you're done. Just visit every page, or even go get httrack or a similar spider ( wget or something ) to visit the pages for you, and they automatically generate the HTML versions.