Re: round to nearest 500?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 7:57 PM +0100 2/12/07, Marc Weber wrote:
On Mon, 12 Feb 2007 18:02:41 +0100, <tg-php@xxxxxxxxxxxxxxxxxxxxxx> wrote:

Is there an easy way in php to round to the nearest 500?
Yeah
$rouned = round($val/500) * 500;

I've always questioned the round() function.

I believe it has a downward bias, am I wrong?

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux