- srand((float) microtime() * 10000000);
- $randkey = array_rand($names);
- $rand = $names[$randkey];
+ /* pick 3 names at random and put the players name on position D*/
+ if($i<3)
+ {
+ $randkey = array_rand($copy_names);
+ $rand = $copy_names[$randkey];
+ /* delete this name from the list of possible names */
+ unset($copy_names[$randkey]);
+ }
+ else
+ {
+ $rand = $_SESSION["name"];
+ }
+