[Solved] Grouping in array


try this,
CODE :

foreach($old_array as $key_old => $val_old)
 {
    foreach($val_old as $key => $val)
    {
        if(in_array($key, $VitalInfo_array))
        {
            $new_array[$key_old]['VitalInfo'][$key] = $val;
        }
        else
        {
            $new_array[$key_old]['Price'][$key] = $val;
        }
    }
 }

OUTPUT :

Array
(
    [0] => Array
        (
            [VitalInfo] => Array
                (
                    [Title] => HoMedics MAN-300
                    [ean] => 31262006288
                    [upc] => 31262006288
                    [ProductImageName] => 
                    [CdnUri] => 
                    [ASIN] => B000050FEU
                )

            [Price] => Array
                (
                    [ListPrice] => 129.99
                    [Status] => 2
                    [ActualPrice] => 129.99
                    [ProductID] => 5286728
                )

        )

)

DEMO

i hope it will be helpful.

solved Grouping in array