Re: round

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

 



On Wed, 26 Jan 2005 06:32:32 -0500
blackwater dev <blackwaterdev@xxxxxxxxx> wrote:

> Hello,
> 
> I have these values:
> 
> 8.26456
> 9.7654
> 3.0000
> 5.2689
> 
> and I want them rounded to two decimal places so I use the round :
> round($value,2) which gives me, for example:
> 8.26

You can try the sprintf() function

> But, it also gives me 3 instead of 3.00.  How can I round but retain the 0's?
> 
> Thanks!
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
RE5PECT
Sergio Gorelyshev

-- 
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