Re: changed number_format function

From: Date: Fri, 27 Aug 2004 23:11:16 +0000
Subject: Re: changed number_format function
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-194973@lists.php.net to get a copy of this message
On Fri, 27 Aug 2004 18:48:16 +0200, Marek Kilimajer <lists@kilimajer.net> wrote: > Justin Patrin wrote: > > number_format($number, 2); > > > > Does not work. Desired results: > > >> > >>1000 should return 1,000 > >>1000.5 should return 1,000.5 > >>1000.25 should return 1,000.25 > >>so on. > > Actual results: > > 1000 => 1,000.00 > 1000.5 => 1,000.50 > 1000.25 => 1,000.25 > OIC. Yep, I don't think you can do that with number_format. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#194973) next »