I have 2 arrays. The keys represent the player id in a game (and is the same in both arrays) and the value represents the Ping in one and the score in the other. What I am trying to do is get the Player ID (key) that has the highest ping and the lowest score. I can’t get my head around any of the sorts that would do this.
I don’t have to use 2 arrays, I just don’t know how else to do it.
Thanks.
LIVE Demo: http://codepad.org/46m3mHIH
Arranging this type of architecture would work better…
Then you could more efficiently sort your multi-dimensional array, and retrieve your
$lowestScoreand$highestPingvalues.