Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php group subarrays by column key

$group = array();
foreach ($array as $value) {
    $group[$value['id']][] = $value;
}

var_dump($group);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #group #subarrays #column #key
ADD COMMENT
Topic
Name
6+6 =