Forum Moderators: coopster
$max = 6;But I get repeated numbers sometimes; where I've mistaken?
for($i = 0; count($random) < 5; $i++) {
$random[$i] = rand(1, $max);
for($j = 0; $j < count($random); $j++) {
if($random[$i] == $random[$j]) {
$random[$i] == NULL;
array_pop($random);
}
}
}while(list($key, $value) = each($random))
echo $value . ", ";