php group multidimensional array by value

Solutions on MaxInterview for php group multidimensional array by value by the best coders in the world

showing results for - "php group multidimensional array by value"
Aitana
25 Jan 2018
1function arraySort($input,$sortkey){
2  foreach ($input as $key=>$val) $output[$val[$sortkey]][]=$val;
3  return $output;
4}