ob_start not working

Hi all,

I’m in the middle of creating my own templating system - but am having some troubles with ob_start().

This works fine (I don’t see any output):


<? ob_start(); echo "Blargh!"; $content = ob_get_contents(); ob_end_flush(); ?>

This doesn’t (output is still displayed):


<? ob_start(); include("layout.php"); $content = ob_get_contents(); ob_end_flush(); ?>

Where layout.php =


<? include "top.php"; ?>
<? include "header.php"; ?>
<? include "navigation.php"; ?>
<? include "content.php"; ?>
<? include "footer.php"; ?>
<? include "bottom.php"; ?>

Does output buffering not work for nested includes?