imimin Posted July 10, 2009 Share Posted July 10, 2009 How would I round this to 2 decimal places? <?php $item_retail = ($_GET['item_retail']*.75); echo "Starting at $"."$item_retail"." each" ?> Link to comment https://forums.phpfreaks.com/topic/165512-round-multiply-function-to-2-decimal-places/ Share on other sites More sharing options...
wildteen88 Posted July 10, 2009 Share Posted July 10, 2009 Using the round function Link to comment https://forums.phpfreaks.com/topic/165512-round-multiply-function-to-2-decimal-places/#findComment-872958 Share on other sites More sharing options...
Maq Posted July 10, 2009 Share Posted July 10, 2009 number_format works as well. It also has some more useful features. Link to comment https://forums.phpfreaks.com/topic/165512-round-multiply-function-to-2-decimal-places/#findComment-872959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.