I have two arrays stored in an array. They have the same number of values and are aligned:
$matrix['label1']
$matrix['label2']
I want to apply alphabetical sorting to $matrix['label1'] and move the contents of $matrix['label1'] in the same pattern. Here is an example of input and output.
$matrix['label1'] = ['b','c','a']
$matrix['label2'] = [ 1, 2, 3]
asort($matrix['label1'])
// outputs ['a','b','c']
//$matrix['label2'] should now be depending on that [ 3, 1, 2]
How can I change my asort() call to get this to work?