Hello all,
I am trying to make a discount function, but I am not sure how to give the discount.
If I have $250 and I want to give it a 100% discount (should be $0.00) how would I calculate that using 100%?
thanks DP
$discount = 100; $price = 250; $final_price = $price * ( 1 - $discount/100);
% sign itself is a modulus operator.