lmhart Posted November 5, 2009 Share Posted November 5, 2009 I am having issues echoing decimal precision. It stores in the DB just fine. Just when I go to display the data it will cut off a trailing 0. So 10.80 ends up echoing 10.8. Is there a relatively easy way to set the precision? If not I can live with it. Its just a cosmetic thing My code to display echo "Amount due - " . $total; echo "<br>"; Thanks, Mark Link to comment https://forums.phpfreaks.com/topic/180443-displaying-decimal-precision/ Share on other sites More sharing options...
Psycho Posted November 5, 2009 Share Posted November 5, 2009 number_format() http://us3.php.net/manual/en/function.number-format.php Link to comment https://forums.phpfreaks.com/topic/180443-displaying-decimal-precision/#findComment-951943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.