Skip to content

Instantly share code, notes, and snippets.

Created July 30, 2012 15:39
What would you like to do?
subval array sort function
function subval_sort($array, $subkey) {
foreach($array as $key => $value) {
$new_array[$key] = strtolower($value[$subkey]);
foreach($new_array as $new_key => $new_val) {
$result[$new_key] = $array[$new_key];
return $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment