note 27435 deleted from language.operators.arithmetic by sniper
| From: | sniper@php.net | Date: | Mon, 13 Oct 2003 00:08:39 +0000 |
| Subject: | note 27435 deleted from language.operators.arithmetic by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58389@lists.php.net to get a copy of this message | ||
Note Submitter: php@tebault.org
----
factorial function
function fact($i) {
$out = 1; // gotta start with out = 1
for($f = 1; $f <= $i; $f++) {
$out = $f * $out;
}
return($out);
};