Skip to content

Instantly share code, notes, and snippets.

@brimstone
Created October 25, 2015 22:31
Show Gist options
  • Save brimstone/5babdfb5d67dfa13b7dd to your computer and use it in GitHub Desktop.
Save brimstone/5babdfb5d67dfa13b7dd to your computer and use it in GitHub Desktop.
<team><?
$fruits = array(
'Bahhumbug' => '40',
'rattle' => '35',
'irongeek' => '30',
'Mirage' => '25',
'SuMo_D' => '20',
'timoguin' => '15',
'oddball' => '10',
'NotLarry' => '5',
'eryc' => '1'
);
$newFruits = array();
foreach ($fruits as $fruit=>$value)
{
$newFruits = array_merge($newFruits, array_fill(0, $value, $fruit));
}
echo $newFruits[array_rand($newFruits)];
?></team>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment