AdamPrintmeit Posted January 20, 2014 Share Posted January 20, 2014 I rent out caravans and am looking to offer pay monthly options. We have worked out a formula in Excel but need to convert it to php. The excel formula is; monthly cost = SUM( "holiday cost" / (rounddown(((( "hol date" - 30) - "todays date")/30),0))) The problem is rounding the number down. Can anyone help? Quote Link to comment Share on other sites More sharing options...
RuleBritannia Posted January 20, 2014 Share Posted January 20, 2014 (edited) There is a function in php called http://uk1.php.net/round round(9.5, 0, PHP_ROUND_HALF_DOWN); returns 9 Edited January 20, 2014 by RuleBritannia 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.