note 61138 deleted from function.round by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 16:21:36 +0000 |
| Subject: | note 61138 deleted from function.round by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154805@lists.php.net to get a copy of this message | ||
Note Submitter: reinhard at ess dot co dot at
----
I have made the round_up-function much more simpler and useable of any values (float or int) ->
if no decimal values then the value is taken else we add one to the value in front of the dot ;)
function round_up($value){
list($val,$dummy) = explode(".",$value);
return $dummy?$val+1:$val;
}