Welcome Guest, Not a member yet? Register   Sign In
Confusing PHP Arithmetic Formula
#5

PHP Code:
<?php printf('$%0.2f', (int)(($priceinfo->numSinglePages 1) / 100 1) * $priceinfo->bindingCost?>

94 pages - 1 = 93
divided by 100 = .93
add 1 = 1.93
multiply by bindingcost = 1.93 * 2.79 = 5.3847
convert the result to an integer: (int) 5.3847 = 5
Reply


Messages In This Thread
Confusing PHP Arithmetic Formula - by Josh1985 - 12-31-2018, 08:01 AM
RE: Confusing PHP Arithmetic Formula - by Wouter60 - 12-31-2018, 03:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB