I have a calculation like this (might be an easier way to work this out, but I am no maths boffin)
$discount_percent = ($reg_price-$sale_price)/$reg_price*100;
This sometimes gives me something like 41.3333333333% which is obviously not what I want to display.
How would you remove all the .3 so it just shows 41% instead.
the best would be that if it is 41.5% or up to 41.9% it would round up to 42% and round down to 41.5% if less than 41.5%