i was reading about the buffering of contents and i found a simple script to show effects of flush
<?php
if (ob_get_level() == 0) ob_start();
for ($i = 0; $i < 10; $i++) {
echo "<br> Line to show.";
echo str_pad('', 4096) . "\n";
ob_flush();
flush();
sleep(2);
}
echo "Done.";
ob_end_flush();
?>
this script works fine and show the output , but when i remove the str_pad or reduce the length from 4096 to 40 flush does not work.
can any one help me out what exactly causing this..