jwk811 Posted February 23, 2007 Share Posted February 23, 2007 my shipping calculator doesnt always come out with a price with exact cents.. how can i make sure it goes only two digits which i would do by rounding? Quote Link to comment Share on other sites More sharing options...
suzzane2020 Posted February 23, 2007 Share Posted February 23, 2007 try this use the round function $dec=12.234; $new=round($dec,2); Quote Link to comment Share on other sites More sharing options...
Barand Posted February 23, 2007 Share Posted February 23, 2007 ... or output it using echo number_format($result,2); 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.