Well... in theory it's possible, of course. But do the math...
Here is code that will do what you want, with numbers 1 thru 10:
<?php
$min = 1;
$max = 10;
for ($u=$min;$u<=$max;$u++) {
for ($v=$min;$v<=$max;$v++) {
if ($u!=$v) {
for ($w=$min;$w<=$max;$w++) {
if (!in_array($w,array($u,$v))) {
for ($x=$min;$x<=$max;$x++) {
if (!in_array($x,array($u,$v,$w))) {
for ($y=$min;$y<=$max;$y++) {
if (!in_array($y,array($u,$v,$w,$x))) {
for ($z=$min;$z<=$max;$z++) {
if (!in_array($z,array($u,$v,$w,$x,$y))) {
echo "[".$u." ".$v." ".$w." ".$x." ".$y." ".$z."] \n";
}
}
}
}
}
}
}
}
}
}
}
?>
I don't recommend you set $max to 30, unless you want to wait for over 110 millon sets to return. Your server will not be happy.