Skip to content

Instantly share code, notes, and snippets.

@bbatsche
Created May 16, 2014 14:06
Show Gist options
  • Save bbatsche/5f9bc1bcc62744a7d488 to your computer and use it in GitHub Desktop.
Save bbatsche/5f9bc1bcc62744a7d488 to your computer and use it in GitHub Desktop.
Multimeter Lottery
<?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