Friday, April 13, 2012

Output buffering

ob_start();

echo "ABC ";
$out1 = ob_get_contents();

echo "XYZ";
$out2 = ob_get_contents();

ob_flush();
echo "
------------------
$out1,$out2";