Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
I read somewhere in the manual that one shouldn't use Float variables when dealing with Currency... It seems to work fine for me though... just use the round function properly when you do a multiplication/division operation. So far everything adds up.
If you are using a MySQL database the "decimal" type is a godsend.
For general calculations the float type is dangerous. It can be made safe if you use the round() function as you say, but you must be sure to use it a lot, including before and after calculations. The inexactness of the float can bite off a penny in a heartbeat.
I would suggest making yourself a set of functions for dealing with currency. I have a set of them I use in C language that puts the dollars and cents into integers and performs the calculations on integers. A similar set in PHP using round() would be easier to construct.
That's a good idea.. I wonder if someone has a class lying around (hmm...) wouldn't want to re-invent the wheel.
I was looking at the php stuff for currency, but my understanding was that I had to set the locale (sp?) -- so that it knew what format the money was in... kind of strange.