<? while(($num == $num1) or ($num == $num2) or ($num == $num3) or ($num == $num4) or ($num == $num5) or ($num1 == $num2) or ($num1 == $num3) or ($num1 == $num4) or ($num1 == $num5) or ($num2 == $num3) or ($num2 == $num4) or ($num2 == $num5) or ($num3 == $num4) or ($num3 == $num5) or ($num4 == $num5)) { } ?>
Nie da się prościej ?

Chodzi oczywiście tylko o ustawienie 6 liczb, od "1" do "6" w losowej kolejności.