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! Link to comment https://forums.phpfreaks.com/topic/94844-number-formatting-question/ 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 Link to comment https://forums.phpfreaks.com/topic/94844-number-formatting-question/#findComment-485810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.