simonp Posted May 15, 2006 Share Posted May 15, 2006 Hi,What would be the best way to deal with rounding money to two decimal places.At the moment I'm getting 14.1 and I want 14.10 Any ideas greatfully appreciated.Simon Quote Link to comment Share on other sites More sharing options...
zq29 Posted May 15, 2006 Share Posted May 15, 2006 This should do it...[code]$number = number_format($number,2);[/code] Quote Link to comment Share on other sites More sharing options...
simonp Posted May 15, 2006 Author Share Posted May 15, 2006 [!--quoteo(post=373998:date=May 15 2006, 09:15 AM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ May 15 2006, 09:15 AM) [snapback]373998[/snapback][/div][div class=\'quotemain\'][!--quotec--]This should do it...[code]$number = number_format($number,2);[/code][/quote]Thanks SemiApocalyptic - that was easy :)Simon 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.