note 27435 added to language.operators.arithmetic
| From: | php at tebault dot org | Date: | Thu, 05 Dec 2002 19:48:48 +0000 |
| Subject: | note 27435 added to language.operators.arithmetic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40391@lists.php.net to get a copy of this message | ||
factorial function
function fact($i) {
$out = 1; // gotta start with out = 1
for($f = 1; $f <= $i; $f++) {
$out = $f * $out;
}
return($out);
};
--
http://www.php.net/manual/en/language.operators.arithmetic.php
http://master.php.net/manage/user-notes.php?action=edit+27435
http://master.php.net/manage/user-notes.php?action=delete+27435
http://master.php.net/manage/user-notes.php?action=reject+27435