Skip to content

Instantly share code, notes, and snippets.

@ezrabrook
Created March 31, 2014 19:11
Show Gist options
  • Save ezrabrook/9899864 to your computer and use it in GitHub Desktop.
Save ezrabrook/9899864 to your computer and use it in GitHub Desktop.
function aasort(&$array, $key){
$sorter = array();
$ret = array();
reset($array);
foreach($array as $ii =>$va){
$sorter[$ii]=$va[$key];
}
asort($sorter);
foreach($sorter as $ii=>$va){
$ret[$ii]=$array[$ii];
}
$array=$ret;
}
@ezrabrook
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment