On Sun, Apr 26, 2009 at 18:15, Gary gwp...@ptd.net wrote:
Sorry for the delay in response. I was able to figure the number_format()
function out.
Thanks for all your responses.
Since you're working specifically with money as described in your
example, Gary, you could also check out
Gary wrote:
I cant seem to get this to work for me. I want the number to be formated to
money (us, 2 decimal points).
/**
* returns 4.3 as $4.30 (formats us dollars)
*
* @param $amount
* @return string
*/
function us_dollar_format( $amount )
{
return ( '$' .
Sorry for the delay in response. I was able to figure the number_format()
function out.
Thanks for all your responses.
Gary
Gary gwp...@ptd.net wrote in message
news:21.39.63007.75193...@pb1.pair.com...
I cant seem to get this to work for me. I want the number to be formated
to money (us,
if your datas are stored in a DB you should specify the precision of the
float in the table : float(8,2)
Anyone have functions for formatting numbers being multiplied by variables
and whatnot to two decimal points - rounded up? As for displaying total
cost, etc?
You mean like PHP's number_format function http://php.net/number_format :-)
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
5 matches
Mail list logo