I would like to make this multidimensional array more readable by using one of its sub key values as index. So this array:
array(
[0]=>array('group_id'=>'2','group_name'=>'red','members'=>array()),
[1]=>array('group_id'=>'3','group_name'=>'green','members'=>array()),
[2]=>array('group_id'=>'4','group_name'=>'blue','members'=>array()),
);
should become this:
array(
[2]=>array('group_name'=>'red','members'=>array()),
[3]=>array('group_name'=>'green','members'=>array()),
[4]=>array('group_name'=>'blue','members'=>array()),
);
Sure i could loop through and rebuild the array, but i was wondering what would be an expert take at this ?