function factorial($number) {
$factorial = 1;
for ($i = 1; $i <= $number; $i++) {
$factorial = $factorial * $i;
}
return $factorial;
}
//example
$result = factorial(5);
//output
echo $result; //120
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)