ob_start();//buf1 echo 'multiple'; ob_start();//buf2 echo 'bufferswork'; $buf2 = ob_get_contents(); ob_end_clean(); $buf1 = ob_get_contents(); ob_end_clean(); echo $buf1; echo ''; echo $buf2;