RE: converting whole or tenth prices to double decimal

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

 



sprintf should also meet your needs although not as well as
money_format()

-----Original Message-----
From: Richard Davey [mailto:rich@xxxxxxxxxxxxxxxx] 
Sent: 23 December 2004 12:31
To: php-general@xxxxxxxxxxxxx
Subject: Re:  converting whole or tenth prices to double decimal

Hello Brian,

Thursday, December 23, 2004, 12:25:23 PM, you wrote:

BAA> Anybody know the easiest way to convert a number like 2.1 to $2.10 
BAA> or 2 to $2.00?

Use the money_format() function.

(Yes, PHP really does have a solution for nearly everything!)

Best regards,

Richard Davey

________________________________________________________________________
This message has been checked for all known viruses by the 
CitC Virus Scanning Service powered by SkyLabs. For further information visit
http://www.citc.it

___

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