I want to round up prices to ensure a 5
or 0
in the hundredths place.
e.g. I have the price £74.31
I want to round to the closest 74.35
or if above £74.36
then £74.40
and the decimals I always want to end with 5
and 0
.
More examples:
£74.31 would be round up to £74.35
£74.32 would be round up to £74.35
£74.33 would be round up to £74.35
£74.34 would be round up to £74.35
£74.35 would be round up to £74.35
£74.36 would be round up to £74.40
£74.37 would be round up to £74.40
£74.38 would be round up to £74.40
£74.39 would be round up to £74.40
£74.40 would be round up to £74.40
I attempted to round up prices with the below
round(($price * $rate) * 2, 1)/2;