<?php
$arr = [0,2,3,4,5];
$num = Getenum($arr,5);
echo "\n",$num,"\n";
function Getenum($arr=[],$len=0){
if($len == 0 || !$arr){
return false;
}
$num = 0;
for($i=0;$i<$len;$i++){
for($j=0;$j<$len;$j++){
for($k=0;$k<$len;$k++){
if($arr[$i]!=$arr[$j] && $arr[$i]!=$arr[$k] && $arr[$j]!=$arr[$k]&&$arr[$i]!=0){
$num++;
//if($num%13==0)echo "
";
echo $arr[$i],$arr[$j],$arr[$k],"\n";
}
}
}
}
}
?>