php group multidimensional array by value

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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}