note 3660 deleted from function.round by jeroen
| From: | jeroen@php.net | Date: | Sat, 01 Sep 2001 12:41:33 +0000 |
| Subject: | note 3660 deleted from function.round by jeroen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17505@lists.php.net to get a copy of this message | ||
If you want a function that rounds up .5 then here it is.
function rounder($value){
$length=strrpos($value,".");
$number=substr($value,$length+1,$length+2);
$start=substr($value,0,$length);
if ($number>4){return $start+1;}else{return $start;}
}