0 ){ demo($num -1 ); }else{  echo "--------------"; }  "/> 0 ){ demo($num -1 ); }else{  echo "--------------"; }  ">
Home > Backend Development > PHP Tutorial > 递归函数,求高手解原理。解决方法

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

WBOY
Release: 2016-06-13 13:48:32
Original
807 people have browsed it

递归函数,求高手解原理。
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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template