I have the code below code that works correctly as what i want. It does not send any output on browser that is what i exactly want.
ob_start();
echo "test";
echo "test";
$output = ob_get_clean( );
But problem is in my below code. below code start sending the output on the browser even i have $output = ob_get_clean( ); at the end
ob_start();
for($i=0;$i<=10000000;$i++){
echo $i."<br/>";
}
$output = ob_get_clean( );
I am unable to understand the concept of output buffering. everyone say you can control the output and send the output when you want but my above script start sending output to the browser.