phpretard Posted January 17, 2008 Share Posted January 17, 2008 round('3.5558', 2); works great on a whole number. What if I want to round "0.5241234" to "0.052"? Any thought? -Anthony Quote Link to comment Share on other sites More sharing options...
Barand Posted January 17, 2008 Share Posted January 17, 2008 <?php $n = 0.5241234; echo round ($n/10, 3) ?> 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.