From the manual:
Output buffers are stacked, that is, you can call ob_start (), while the other ob_start () is active. Just make sure you call ob_end_flush () the appropriate number of times. If multiple output callback functions are active, the output is filtered sequentially through each of them into the nesting order.
In addition to stacking (nesting), you can have individual blocks in sequence.
<? ob_start(); echo "Foo"; ob_end_flush();
source share