RE: [PHP] Variable Precision

From: Date: Fri, 21 Jul 2000 15:22:54 +0000
Subject: RE: [PHP] Variable Precision
Groups: php.general 
Request: Send a blank email to php-general+get-7581@lists.php.net to get a copy of this message
try: $value = sprintf("%3.2f",$value); echo "$value"; Mike > -----Original Message----- > From: Jason [mailto:jasonc@webpipe.net] > Sent: Friday, July 21, 2000 10:20 AM > To: php-general@lists.php.net > Subject: [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? > > Jason > > > _______________________________________________________ > Site Design, Hosting, and E-Commerce at www.webpipe.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#7581) next »