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 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) ?> Link to comment https://forums.phpfreaks.com/topic/86556-solved-round-help/#findComment-442264 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.