RE: [PHP] Formating Numbers

From: Date: Sun, 26 Apr 2009 03:49:55 +0000
Subject: RE: [PHP] Formating Numbers
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-291982@lists.php.net to get a copy of this message
As an alternative you might consider; $number = sprintf("%01.2f",$number); There was a time many years ago you had to be careful doing math with floats. Test, test and test some more. Warren > -----Original Message----- > From: kranthi [mailto:kranthi117@gmail.com] > Sent: Saturday, April 25, 2009 8:38 PM > To: Gary > Cc: php-general@lists.php.net > Subject: Re: [PHP] Formating Numbers > > pl post the desired result, the functions > > if u r trying to get $ 34,567.25 > i dont understand y this is not working for u... > http://php.net/manual/en/function.number-format.php#88486 > > -- > PHP General Mailing List (http://www.php.net/) To > unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#291982) next »