help need on ob_start()

Posted on 16th Feb 2014 by admin

Hi

I am a newbie in php, I have a code
Line number On/Off | Expand/Contract <?phpob_start();for($i=1;$i<=10;$i++){ sleep(1); echo $i; ob_flush();}?>

I am trying to display one number in each second, but the browser showing all the numbers at once. where is the error ? how can I modify this code to show such a way

Other forums