Help
-
Search
-
Members
-
Calendar
Full Version:
PHP Timer
Invision Power Services
>
Community Forums
>
Community Web Design and Coding
Michael Boutros
May 6 2005, 06:10 PM
In my script, I want it to print out the words "Hello World" 40 times, once every 20 seconds. How would I go along doing this?
_
May 6 2005, 06:44 PM
CODE
for($a = 0; $a < 40; $a++)
{
echo "Hello World";
sleep(20);
}
That should do, but you'll need to bypass max_execution_time.
However, it won't display anything until execution is over. I believe that's unbypassable.
phatmonkey
May 7 2005, 08:22 AM
CODE
for($a = 0; $a < 40; $a++)
{
echo "Hello World";
flush();
sleep(20);
}
_
May 7 2005, 09:56 AM
Hey, that's cool!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2009
Invision Power Services, Inc.