Php Ranking Function

I need a PHP function that will process an array of values (250 comma delimited values, along with 250 ids) which are delivered in descending order. I want those values to be “re-factored” to a point range from 1 – 100, based on the values in the original range.

So, for the following array pair

(1=>16, 2=>14, 3=>3, 4=>1, 5=>0, 6=>-1, 7=>-4)

the value range is -4 to 16

where -4 would become 1 and 16 would become 100, and the rest of the values would be calculated…

Leave a Reply

Your email address will not be published. Required fields are marked *