I need help with the next problem…
I have a list of values… prices in my case.
Im converting a csv file with prices. all is very good, but i need a solution to calculate a discount for a range of price.
Ex:
1234 , 230
2345, 500
5432 , 800
“modified”
i need to apply a discount of
3% off for values range 100-250
10% off for values range 250-500
25% off for values range 500-1000
so, i have the column with values.
$values[2]
$formula = round($values * 0.97, 0); // this is only geting 3% for all values from column.
But i need help to get the correct disocunt for a range all ranges.
Thanks
Am I missing something here?