Re: Formatting Percents

From: Date: Fri, 17 Aug 2001 05:11:00 +0000
Subject: Re: Formatting Percents
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63137@lists.php.net to get a copy of this message
When you print out the value just use printf("%.2f",$bprice); Like in C On Thursday 16 August 2001 21:31, you wrote: > Hello everyone, > > I am having a problem and can't seem to find an answer. Maybe someone here > can help. I have a gift store that has prices of items. Well each item has > a retail price that I have added to the DB. Let's say I want to sell the > products at a discount of 15% but I don't want to change all the records. I > want to use PHP to configure the 15% off price. How does one do this? Does > the MySQL field need to be formatted a certain way? > > I want to show: > > Retail Price: $100.00 > Your Price: $85.00 > > Thanks in advance and let me know if you need more information. > > David Smith > Indy Web Design > 877-347-1270 or 317-573-2486 > http://www.indywebdesign.com > > -------------------------------------- > Visit our online gift store at > http://www.123giftshopping.com.

« previous php.general (#63137) next »