Calculating Currencies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mzfp2
Forum Contributor
Posts: 137
Joined: Mon Nov 11, 2002 9:44 am
Location: UK
Contact:

Calculating Currencies

Post by mzfp2 »

Hi,

I am creating a shopping cart, which must support multiple currencies. We've decided to not leech of other websites for the current exchange rates therefore the exchange rates are defined by the admistrators of the website and are fixed.

I need some help calculating currency conversions, I'm not sure if this is right, but if the default currency is GBP, exchange rate 1.00, would the equation be as simple as belowif converting to USD?

USDPrice = GBP_Rate * USD_Rate
(where GBP is the base rate set at 1.00)?

Any help would be appreciated.

Thanks.
Musaffar.
mzfp2
Forum Contributor
Posts: 137
Joined: Mon Nov 11, 2002 9:44 am
Location: UK
Contact:

Post by mzfp2 »

I've managed to work it out, wasn't too difficult after all !
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

another satisfied customer... 8)
Post Reply