<?php//от 1 до 100000000 случайные числа, выедем 50;$length=10;$start=1;$end=10;$array=array();while (count($array)<$length) { $array[mt_rand($start,$end)]="";}print_r(array_keys($array));
Standard input is empty
Array ( [0] => 6 [1] => 7 [2] => 2 [3] => 9 [4] => 4 [5] => 1 [6] => 3 [7] => 8 [8] => 5 [9] => 10 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!