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 https://forums.phpfreaks.com/topic/86556-solved-round-help/ 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 https://forums.phpfreaks.com/topic/86556-solved-round-help/#findComment-442264 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.