phpretard Posted September 18, 2008 Share Posted September 18, 2008 This works fine for a remainder. I can't figure a way to display Zeros the result is for instance $100.00 Now it will only display $100 $price=round($multiplier*.0275, 2); Any help, pointer, quick code snips...? Quote Link to comment Share on other sites More sharing options...
akitchin Posted September 18, 2008 Share Posted September 18, 2008 have a look at using number_format() with a 2 for decimals after performing the round()ing. Quote Link to comment Share on other sites More sharing options...
phpretard Posted September 18, 2008 Author Share Posted September 18, 2008 So somthing like this? $price=round($multiplier*.0275, 2 ,",","."); Quote Link to comment Share on other sites More sharing options...
akitchin Posted September 18, 2008 Share Posted September 18, 2008 So somthing like this? $price=round($multiplier*.0275, 2 ,",","."); i'm not sure where you got that from, round() is still only a two-parameter function. try this: $price = number_format(round($multiplier*0.0275, 2), 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.