基于php中的特定值合并数组

How to join or group an array. For example:

array (size=2)
 0 => 
    array (size=1)
      0 => data0
 1 => 
    array (size=1)
      1 => data1

How do i make the array above to this array below?

array (size=1)
 0 => 
    array (size=2)
      0 => data0
      1 => data1

Is this possible to join 2 values in 1 index? please help.

how about this:

$array1 = array(
    array (
       'month' =>  'January',
       'item1' =>  '120000'
    ),
    array (
      'month' =>  'February' ,
      'item1' =>  '1' 
    ),
    array (
      'month' =>  'March' ,
      'item1' =>  '5206' 
    ),
    array (
      'month' =>  'April', 
      'item1' =>  '0' 
    ),
    array (
      'month' =>  'May' ,
      'item1' =>  '0' 
    ),
    array (
      'month' =>  'June',
      'item1' =>  '0' 
    ),
    array (
      'month' =>  'January' ,
      'item2' =>  '0' 
    ),
    array (
      'month' =>  'February' ,
      'item2' =>  '0' 
    ),
    array (
      'month' =>  'March' ,
      'item2' =>  '5106' 
    ),
    array (
      'month' =>  'April', 
      'item2' =>  '0' 
    ),
    array (
      'month' =>  'May', 
      'item2' =>  '0' 
    ),
    array (
      'month' =>  'June', 
      'item2' =>  '0' 
    )
);

$resp = call_user_func(function($array1,$keyval){
    $response = array();
    $count = 0;
    foreach($array1 as $arr1){
        array_walk($array1, function($item,$index)use($arr1,&$response,$count,$keyval){
            if($arr1[$keyval] == $item[$keyval]){
                $response[$count] = array_merge($arr1,$item);
            }
        });
        $count++;
    }
    foreach($response as $key=>$value){
        $c = 1;
        array_walk($response,function($item,$index)use($value,&$c,&$response,$key,$keyval){
            if($item[$keyval] == $value[$keyval]){
                if($c > 1){
                    unset($response[$index]);
                }
                $c++;
            }
        });
    }
    return $response;
},$array1,'month');
var_dump($resp);