Lets say i wanted to echo "hello" every second, how would i do this? I have tried it in a while(true) loop and using some ob flush'ing, but it just wont print it![]()
| SitePoint Sponsor |
Lets say i wanted to echo "hello" every second, how would i do this? I have tried it in a while(true) loop and using some ob flush'ing, but it just wont print it![]()
I got it!
PHP Code:<?
set_time_limit(0);
while(true) {
echo "Hello<br>";
flush();
ob_flush();
sleep(1);
}
?>



What is this for?
I hope you aren't going to make it generate infinite js popup![]()
Speed & scalability in mind...
If you find my reply helpful, fell free to give me a point
Bookmarks