For each individual row of an array, I would like it to sort by a function that I perform on each value.
1 => "great",
2 => "bad",
3 => "awesome",
and I have a function that would make great a 2, bad a 1, and awesome a 3. So how would I resort the array to make bad and great switch?
If further explanation is required, please tell me what to clarify. (Sorry I'm not good at explaining concepts :p)