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" ?> Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.