Hi all
I have a huge array of results with potentially hundreds of key/value pairs, and a small snippet of what that array looks like would be as follows:
[1234] => 250
[3463] => 240
[5865] => 230
[2312] => 150
[8765] => 100
[4934] => 50
[1854] => 25
[8432] => 10
[9976] => 1
[1001] => 22
[2332] => 67
[2337] => 99
[6332] =>145
[7338] => 201
[2332] => 255
Now, what I need to do is to be able to take and display (for example) the 8 nearest key/value pairs to the lowest value in the array, so ultimately using the above example, I would end up with the following result:
[9976] => 1
[8432] => 10
[1001] => 22
[1854] => 25
[4934] => 50
[2332] => 67
[2337] => 99
[8765] => 100
Are there any built in php functions that would allow me to do this?
If not, can anyone suggest how this might be achieved?
Many Thanks