note 87103 modified in function.round by thiago

From: Date: Wed, 19 Nov 2008 14:00:55 +0000
Subject: note 87103 modified in function.round by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146710@lists.php.net to get a copy of this message
When needing to Round Up to a whole number I did use no complicated function. I just did this. <?php if(eregi('.',$number)){ $num=split('[.]',$number); $number=$num[0]+1; } ?> --was-- When needing to Round Up to a whole number I did use no complicated function. I just did this. if(eregi('.',$number)){ $num=split('[.]',$number); $number=$num[0]+1; } http://php.net/manual/en/function.round.php

« previous php.notes (#146710) next »