You can use the number_format($number, decimal_places) function.

-----Original Message-----
From: blackwater dev [mailto:[EMAIL PROTECTED] 
Sent: 26 January 2005 01:33 PM
To: php-general@lists.php.net
Subject: [PHP] round

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

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

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

Reply via email to