Are you maybe thinking about page caching? This is a good way to go if your content doesn't change often.
Rather than generating pages dynamically at every page request, you can use php to write normal html files - then rebuild the pages whenever content changes.
You'd basically be using the same scripts & database setup but, rather than outputing to the browser, the scripts have some extra code to:
(1) capture browser output in a buffer
(2) copy the buffer string to a var
(3) write the var to a file
This could be the core of a page caching script:
// db queries, declare a bunch of vars etc
........
// capture output
ob_start();
include("html/template.htm");
// copy buffer to string
$browser_output = ob_get_contents();
// silently clear buffer
ob_end_clean();
// write file
$fp = fopen($filename, "wb");
fputs($fp, $browser_output);
fclose($fp);
ob_start() creates the buffer: this has to come before the first part of your script which outputs to the browser (an echo usually).
I usually declare a bunch of vars in php then include an html template where they are echo'd out, hence the ob_start() comes before the include() line above.