rand(1,N) but excluding array(a,b,c,..),
rand(1,N)
array(a,b,c,..)
is there already a built-in function that I don\'t know or do I have to implement it myself(how?)
This is the fastest & best performance way to do it :
$all = range($Min,$Max); $diff = array_diff($all,$Exclude); shuffle($diff ); $data = array_slice($diff,0,$quantity);