RE: FORMAT return?

From: Date: Thu, 30 Aug 2001 17:36:59 +0000
Subject: RE: FORMAT return?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65343@lists.php.net to get a copy of this message
On 30-Aug-2001 Glyndower wrote: > If i have a feild in a database that has a currency amount like 1000000.00 > > Is there a way to FORMAT AS (x,xxx,xxx.xx) in the sql so that the return is > 1,000,000.00 ? > > Or is there way to do it in PHP? > function moneynbsp($f=0.00) { $rv=' '; if (isset($f)) { if ( abs($f) > 0.004) $rv='$' .number_format($f, 2); } return($rv); } Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query)

« previous php.general (#65343) next »