note 42673 modified in ref.math by aidan
| From: | aidan@php.net | Date: | Sat, 26 Jun 2004 03:00:07 +0000 |
| Subject: | note 42673 modified in ref.math by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71705@lists.php.net to get a copy of this message | ||
Here is my factorial function which i think is very simple and without any confusion. email me
comments if you like if i had something wrong.
<?php
function factorial($number)
{
$temp = 1;
while ($number > 1){
$temp *= $number--;
}
return $temp;
}
?>
--was--
Here is my factorial function which i think is very simple and without any confusion. email me
comments if you like if i had something wrong.
function factorial($number)
{
$temp = 1;
while ($number > 1){
$temp *= $number--;
}
return $temp;
}
http://php.net/manual/en/ref.math.php