PDA

View Full Version : 15.8 to 15.80


Ultragames
01-13-2005, 08:25 PM
I need to keep the zero at the end of my prices for my shopping cart, for visual purposes. How can i display my int to the 100th, even if its zero?

Thank you.

devinemke
01-13-2005, 08:35 PM
you could simply store the price as a string rather than as integer or float. PHP will automagically type cast for you when comparing. you should also look at number_format (http://www.php.net/number_format).