Arnold Daniels has a quick little tutorial posted to his blog about using the output handler in PHP (one of what he considers a technique that's "missing out" from normal PHP use). His example involves buffering the common page parts - like a template.
A website usually has a part which is common across all pages, containing the HTML header, the menu and those kinds of things. This is often solved in one of four ways. [...] All of these methods work, however there is a better way to solve this. You guessed it, by using an output handler.
He links to an example he's created and includes the code for his OutputHandler class to make controlling the content easier.