To do this correctly you should be doing ob_start()
after ob_get_clean()
<?php
ob_start();
$text = array();
echo 'first text';
$text[] = ob_get_clean();
ob_start();
echo 'second text';
$text[] = ob_get_clean();
ob_start();
echo 'third text';
$text[] = ob_get_clean();
ob_start();
echo 'fourth text';
$text[] = ob_get_clean();
print_r($text);
?>