Using the below for sorting a multidimensional array by screen name:
$sortArray = array();
foreach($members as $member){
foreach($member as $key=>$value){
if(!isset($sortArray[$key])){
$sortArray[$key] = array();
}
$sortArray[$key][] = $value;
}
}
$orderby = "screen_name";
array_multisort($sortArray[$orderby],SORT_ASC,$members);
But uppercase is being sorted before lowercase:
Allan Brenda Greg works
But Frank comes before dan
There's a lot out there on sorting arrays, but I finally got this working using the above, wanted to see if there was an easy way to fix it?