Advertisement
kazlik

rand_best();

Sep 4th, 2012
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. //není moje fce
  2. function rand_best($min, $max) {
  3.     $generated = array();
  4.     for ($i = 0; $i < 100; $i++) {
  5.         $generated[] = mt_rand($min, $max);
  6.     }
  7.     shuffle($generated);
  8.     $position = mt_rand(0, 99);
  9.     return $generated[$position];
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement