Re: Subtracting Money
| From: | HiTCHO) | Date: | Fri, 15 Nov 2002 01:28:08 +0000 |
| Subject: | Re: Subtracting Money | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124553@lists.php.net to get a copy of this message | ||
This sounds like you are in Javascript.. if not what about just replacing
out the $ with nothing then doing the equation and then re adding and
formating to currency.
You could do the same with Javascript as well.
Timothy Hitchens (HiTCHO)
tim@hitcho.com.au
If you need PHP hosting with an experienced
support team 24/7 then email me today.
On Thu, 14 Nov 2002, Stephen wrote:
> I'm having a problem. I need to subtract money, but if they type in an ammount such as
> $2.30 and I subtract $0.20, instead of returning $2.10 like it should, it returns $2.1. How can I
> fix this keeping in mind that other variable could be $2.40 or $100.30 and so on...?
>
> Thanks,
> Stephen Craton
> http://www.melchior.us
>
> "Life is a gift from God. Wasting it is like destroying a gift you got from the person you
> love most." -- http://www.melchior.us