function demo($num)
{
echo $num."<br/>";
if($num > 0 ){
demo($num -1 );
}else{
echo "--------------<br/>";
}
echo $num."<br/>";
}
demo(10);
------解决方案--------------------
http://blog.csdn.net/zhangchao3322218/article/details/6835000
http://www.blogjava.net/flysky19/articles/95785.html