Hi Guys I have an array that contains football players name and position like this:
Player name,Player Position
Here is an example of one of the lines in the array:
TestName,DF
etc and I have 3 positions DF, MD and AT
Each player will have one of those values
How do I sort the array so that when the player chooses to sort the team into the formation for example
5-3-2
the first part 5 is DF
the second part 3 is MD
and the third part 2 is AT
So it looks like this:
DF,DF,DF,DF,MD,MD,MD,AT,AT
How would I sort the array so that the 5 players with DF value are at the top then the 3 players with MD value are in the middle and the 2 players with AT value are at the bottom?