I want to select a random value from a array, but keep it unique as long as possible.
For example if I\'m selecting a value 4 times from a array of 4 elements, the s
http://codepad.org/sBMEsXJ1
= $numRandoms) { while (count($final) < $numRandoms) { $random = $array[rand(0, $count - 1)]; if (!in_array($random, $final)) { array_push($final, $random); } } } var_dump($final); ?>