6) { $l = 100; $ameliorations = array(); while (rand(1, 100) < $l) { $choix = rand(0, count($amelioration)-1); $ameliorations[strtolower($amelioration[$choix])] = $amelioration[$choix]; unset($amelioration[$choix]); $amelioration = array_values($amelioration); $l=$l-5; } if (count($ameliorations) > 0) { $chateau.=' avec '.implode(", ", $ameliorations); } } return $chateau; } function creeraddonmili() { return db_get_one_random_partial_value("ChateauAddon"); }