I have 5 functions. Each function uses the variable $player for Player. They each give the player a kit: how can I make it so these function are random? like so it will give random kits
try this: PHP: $random = mt_rand(1,5); switch($random){ case 1: $this->onefunction; break; case 2: $this->twofuncton; break; case 3: $this->treefunction; break; case 4: $this->fourfunction; break; case 5: $this->fivefunction; break; } It may not be the best way to do this, but it should work.