Ok this is bugging me and I think its probably the easiest thing in the world to answer.
I have a database which uses floats for prices, because it needs decimals > however with phpmyadmin it doesnt keep .00 or .10 the latter becoming .1 however this doesnt look good at all. The prices were originally varchars but that made the prices not order properly.
Anyone know how I get the .00 back?
Thanks
Aravona
hopefully simple data type question.
Moderator: General Moderators
Re: hopefully simple data type question.
You don't store .00 or .10 or whatever.
When displaying your data just use number_format($num, 2)
When displaying your data just use number_format($num, 2)