Unique Random Numbers in PHP 2010-05-13 60 words - 1 min read If you would like to show random numbers using PHP you can do this: 1 2 3 4 5 6 7 8 9 10 11 12 <?php $min = 1; $max = 100; $total = 100; $arrItems = array(); while ( count($arrItems) < $total ) { $item = mt_rand($min,$max); if (!in_array($item,$arrItems)) { $arrItems[] = $item; echo $item."<br />"; } }