How do I sort both rows in this array by the nums
values?
[
'nums' => [34, 12, 13],
'players' => ['Mike', 'Bob', 'Mary']
]
Desired result:
[
'nums' => [12, 13, 34],
'players' => ['Bob', 'Mary', 'Mike']
]
array_multisort($x['nums'],$x['players']);