I don't know where the error is. it seems like an endless loop. & lt ;? PhpPHPcoderesult (); functionresult () {while ($ _ POST [& quot; m & quot;] & amp; $ _ POST [& quot; n & quot; I don't know where the error is. it seems like an endless loop.
PHP code
result();function result(){ while($_POST["m"]&&$_POST["n"]) {$outmap = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);$arr[20]=array(0);$j=0;do{ for($t=0;$t<$_POST["n"];++$t) { $array=array($arr[$t]); echo $outmap[$array]; } echo "\n"; $j++; echo $j;}while(combinatorics($arr,$_POST["m"],$_POST["n"]));}}function combinatorics($arr,$nMaxElm,$nDepth){ $n=$nDepth-1; for(++$arr[$n];$n>=0&& $arr[$n]>=$nMaxElm;++$arr[--$n]); if($n<0) return 0; for($t=$n+1;$t<$nDepth;++$t) $arr[$t] = $arr[$n]; return 1;}?>
------ Solution --------------------
It is estimated that while ($ _ POST ["m"] & $ _ POST ["n"])
If ($ _ POST ["m"] & $ _ POST ["n"]), your program will output the expected results.
Discussion
PHP code
Result ();
Function result ()
{
While ($ _ POST ["m"] & $ _ POST ["n"])
{
$ Outmap = array (, 10, 15 );
$ Arr [20] = array (0 );
$ J = 0;
Do {
For ......
------ Solution --------------------
PHP code
while($_POST["m"]&&$_POST["n"])