mattm1712 Posted May 3, 2012 Share Posted May 3, 2012 i am echoing out a value which is 1.2900 but i want it to echo out 1.29 how do i do this? cheers matt Quote Link to comment https://forums.phpfreaks.com/topic/262003-how-do-i-roun-to-2-decimal-places/ Share on other sites More sharing options...
Zephni Posted May 3, 2012 Share Posted May 3, 2012 round(1.95583, 2); will produce 1.95 http://php.net/manual/en/function.round.php Quote Link to comment https://forums.phpfreaks.com/topic/262003-how-do-i-roun-to-2-decimal-places/#findComment-1342583 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.