$arr = array( '0'=>array( 'firmware'=>'f1', 'version'=>'1', ), '1'=>array( 'firmware'=>'f1', 'version'=>'2', ), '2'=>array( 'firmware'=>'f1', 'version'=>'3', ), '3'=>array( 'firmware'=>'f2', 'version'=>'1', ), '4'=>array( 'firmware'=>'f2', 'version'=>'2', ), ); $new_arr = array(); foreach ($arr as $row ){ $new_arr[$row['firmware']][] = $row['version']; } var_dump($new_arr);