An HTML-Friendly Template System using PHP’s Output Buffering

Template systems are an important component of today’s websites. Most of them are designed so that you have to include single splitted header and footer templates into every page. Let’s see whether we can create a template system that does not destroy the natural markup structure of the surrounding HTML at the top and the bottom of a web page.