<? for($i=0;$i<100;$i++) { $array[] = rand(1,999); } sort($array); echo $array[ count($array) - 1 ] ?>