Created
May 16, 2014 14:06
-
-
Save bbatsche/5f9bc1bcc62744a7d488 to your computer and use it in GitHub Desktop.
Multimeter Lottery
This file contains hidden or 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
<?php | |
$students = array( | |
'Andrew', | |
'Caitlin', | |
'Josue', | |
'Genaro', | |
'Amanda', | |
'Ashley F', | |
'Michael', | |
'Greg V', | |
'Ashley W', | |
'Greg M', | |
'Johnathan', | |
'Cole', | |
'Frank', | |
'Lori', | |
'Daniel', | |
'Anthony' | |
); | |
for ($i = count($students); $i > 0; $i--) { | |
echo "$i...\n"; | |
sleep(1); | |
} | |
$winner = array_rand($students); | |
echo "{$students[$winner]} gets the Multimeter!\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment