Created
May 11, 2013 09:28
-
-
Save imjjss/5559431 to your computer and use it in GitHub Desktop.
time counter with user input as start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list($hours, $minutes, $seconds) = explode(':', $_POST['time']); | |
$seconds = $hours * 3600 + $minutes * 60 + $seconds; | |
for ($i = $seconds; $i > 0; $i--) | |
{ | |
echo $i; | |
sleep(1); | |
flush(); | |
} | |
echo 'Countdown finished.'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment