RE: [PHP] Formatting Percents

2001-08-16 Thread David Smith
What I have in code. If the retail price is $139.95 and I use the following: $aprice = $hotbuys[price] * .15; // Determine Discount $bprice = $hotbuys[price] - $aprice; // Subtract Discount $bprice = 118.9575 How can I format that to just 118.96? -Original Message- From: David

RE: [PHP] Formatting Percents

2001-08-16 Thread David Smith
DOH, wouldn't you know it. As soon as I sent these messages I found my answer... $sellprice = round ($bprice, 2); -Original Message- From: David Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 11:50 PM To: David Smith; [EMAIL PROTECTED] Subject: RE: [PHP] Formatting

Re: [PHP] Formatting Percents

2001-08-16 Thread David Robley
On Fri, 17 Aug 2001 14:19, David Smith wrote: What I have in code. If the retail price is $139.95 and I use the following: $aprice = $hotbuys[price] * .15; // Determine Discount $bprice = $hotbuys[price] - $aprice; // Subtract Discount $bprice = 118.9575 How can I format that to just

Re: [PHP] Formatting Percents

2001-08-16 Thread Evan Nemerson
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