0 ){ demo($num -1 ); }else{  echo "--------------"; }  "/> 0 ){ demo($num -1 ); }else{  echo "--------------"; }  ">

首页 >后端开发 >php教程 > 递归函数,求高手解原理。解决方法

递归函数,求高手解原理。解决方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-13 13:48:32835浏览

递归函数,求高手解原理。
function demo($num)
{
echo $num."
";
if($num > 0 ){
demo($num -1 );
}else{ 
echo "--------------
";
}
  echo $num."
";
}
   
  demo(10);

------解决方案--------------------
http://blog.csdn.net/zhangchao3322218/article/details/6835000
http://www.blogjava.net/flysky19/articles/95785.html

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn