×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: PHP
Posted by: Timur Mukhtarov
Added: Jul 23, 2015 9:42 AM
Views: 14
Tags: no tags
  1. function _group_by($array, $key) {
  2.     $return = array();
  3.     foreach($array as $val) {
  4.         $return[$val[$key]][] = $val;
  5.     }
  6.     return $return;
  7. }