Let's say I started here:
$arr[0] = array('a' => 'a', 'int' => 10);
$arr[1] = array('a' => 'foo', 'int' => 5);
$arr[2] = array('a' => 'bar', 'int' => 12);
And I want to get here:
$arr[0] = array('a' => 'foo', 'int' => 5);
$arr[1] = array('a' => 'a', 'int' => 10);
$arr[2] = array('a' => 'bar', 'int' => 12);
How can I sort the elements in an array using the elements of these elements?
Multidimensional arrays always feel a little more than my brain can handle (-_-) (until I figure them out and they seem very light)
source
share