Solution for "find factorial of a number php"

function Factorial($number){ if($number <= 1){ return 1; } else{ return $number * Factorial($number - 1); } } $number = 5; $fact = Factorial($number); echo "Factorial = $fact"; //output : 120 ?>

factorial function php

Similar codes for "find factorial of a number php"


Latest 'PHP' questions

Added before "find factorial of a number php"