I am using a code like below <?php for($i=0;$i<3;$i++) { ob_start(); echo '<iframe src=http://google.com/ width=1000 height=800></iframe>'; ob_end_flush(); flush(); sleep(10); } ?> PHP: Buts its giving the output at the end of the loop..instead i want the output during every loop..so i used ob stuff but still geting it in the end.. any help will be highly appreciated. Thanks
Let's try to run a simpler program: <?php for($i=0;$i<3;$i++) { ob_start(); echo 'It works...'; ob_end_flush(); flush(); sleep(10); } ?> Code (markup): Is this the behavior you want? Could you try this code, please?
Yes thats the behaviour i need to implement...i dont understant whats the difference in the above two codes?
Quote from: http://www.php.net/sleep Please read the entire page above, as it might provide additional explanations.