RE: [PHP] Variable Precision

From: Date: Fri, 21 Jul 2000 15:27:27 +0000
Subject: RE: [PHP] Variable Precision
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7583@lists.php.net to get a copy of this message
Thanks. Just what I was looking for. Jason > -----Original Message----- > From: Boget, Chris [mailto:Chris.Boget@wild.net] > Sent: Friday, July 21, 2000 9:28 AM > To: 'jasonc@webpipe.net'; php-general@lists.php.net > Subject: RE: [PHP] Variable Precision > > > > How can you set the precision for float-type variables like > > with C/C++? I'm trying to output a monetary amount > > but can't seem to figure out how to keep trailing zeros. I > > know it's probably very easy. Could someone please enlighten > > me? > > 2 functions can help you here: > > number_format() > printf() > > If you are familiar with C/C++, you know how to use printf(). > However, I generally use number_format() as it is much simpler. > > Chris > _______________________________________________________ Site Design, Hosting, and E-Commerce at www.webpipe.net

« previous php.general (#7583) next »