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? Link to comment https://forums.phpfreaks.com/topic/285527-excel-formula-to-php-code/ Share on other sites More sharing options...
RuleBritannia Posted January 20, 2014 Share Posted January 20, 2014 There is a function in php called http://uk1.php.net/round round(9.5, 0, PHP_ROUND_HALF_DOWN); returns 9 Link to comment https://forums.phpfreaks.com/topic/285527-excel-formula-to-php-code/#findComment-1465891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.