Using PHP for a couple of mathematical operations, mainly reducing price by an arbitrary fraction amount.
Like this:
(75 / 100) * 80;
This outputs $60, but for the purposes of a web shopping cart, a 75% reduction should equal $20. Is there something I am missing or some way to "inverse" the result?
Just do something like (1- (75/100)) * 80;
which will evaluate to 20
.