I see (not just on this site) a lot of question from inexperienced PHP programmers about the infamous \"headers already sent... output started at\" error, and many people su
for template systems you will need ob_start ... look and Zend_View
Later Edit I misunderstood the question and provided a case where ob_start use is a valid solution.