ivytony Posted March 7, 2008 Share Posted March 7, 2008 the price column in my database is a 'decimal(10,3)', I need show $0.015 as the price. In the meantime, I also need to show $70.00. But after setting the price column to 'decimal(10,3)', prices in whole number such as $70 are shown $70.000. I am wondering how to just show $70.00. Should I cast the numbers to integer? thanks! Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 7, 2008 Share Posted March 7, 2008 Take a look at the number_format() function. Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.