note 20641 added to function.min
| From: | mike at hbhosting dot com | Date: | Thu, 11 Apr 2002 04:32:36 +0000 |
| Subject: | note 20641 added to function.min | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29091@lists.php.net to get a copy of this message | ||
A revision to the last post, this one actually works ;)
function minnum($numarray){
//dont use min(), it contains a bug!
$min=0;
if(is_array($numarray)==true){
$min=max($numarray);
for($z=0;$z<count($numarray);$z++){
if(is_int($numarray[$z])==true){
if($numarray[$z] < $min){$min=$numarray[$z];}
}
}
}
return $min;
}
--
http://www.php.net/manual/en/function.min.php
http://master.php.net/manage/user-notes.php?action=edit+20641
http://master.php.net/manage/user-notes.php?action=delete+20641
http://master.php.net/manage/user-notes.php?action=reject+20641