I have 3 percentile values calculated that are stored in variables like this:
$twentyfive = '55';
$fifty = '80';
$seventyfive = '95';
Each user on my website has a value from 20-100 stored in the variable: $percentile and I am trying to match their number closest to one of the three variables above so I can say: You are part of the X percentile.
For example, if a users $percentile value was '35' they would be matched with $twentyfive since that's the closest variable to their number.
Any help would be appreciated