Codice PHP:
$a = array(1,4,6,7,2,9,10,143,35,2,5);
srand((float)microtime() * 1000000);
shuffle($a);
$i rand(0,count($a));
echo 
$a[$i];