Example of Recursive Function in php
##Example1
function display($number){
if($number <= 5){
echo "$number
";
display($number+1);
}
}
display(1);
## Factorial Example
function factorial($n){
if($n==0){
return 1;
}else{
return($n * factorial($n-1));
}
}
echo factorial(5);