I've got a sorting problem that is beyond the ability of my mortal brain to figure out.
I have an array (called $result) which has an associative array inside each index number (these vary in number, starting at 0 and counting up to an unknown amount). So $result[0] is an associative array, so is $result[1]. Now, each associative array has a number of key-value pairs - always the same keys, differing values.
What I need to do is sort the out-layer array, using alphanumeric order, but sorting based on one of the values inside the associative array contained inside the indexes of the main array. I need to sort $result based on $result[n]["rank"].
Now, if that's possible, I have one more layer of complexity. I need to sort $result based on $result[n]["rank"] and sort within those groupings (many ranks will be the same) based on alphanumeric order within $result[n]["id"]
I KNOW this must be possible... but I fear I've met my match.