Try:
number_format()
Hugh
- Original Message -
From: "Sascha Cunz" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 5:37 PM
Subject: Re: [PHP] Subtracting Money
Hi Step
Hi Stephen,
> 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...?
This is
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)
[EMAIL PROTECTED]
If you need PHP hosting with an expe
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 Cratonht
4 matches
Mail list logo