Jump to content

Converting multidimensional array to 2-dimensional array in PHP

In short, I want this:

    [0] => Array        (            [TPartsLoadingAndUnloadingMain] => Array                (                    [parts_loading_and_unloading_id] => 80660                    [loading_and_unloading_day] => 2004-05-07 00:00:00                )            [MCustomer] => Array                (                    [customer_name] => 株式会社コベコン.エアーテクノ                )            [MMachine] => Array                (                    [initial] =>                 )        )    [1] => Array        (            [TPartsLoadingAndUnloadingMain] => Array                (                    [parts_loading_and_unloading_id] => 80661                    [loading_and_unloading_day] => 2004-05-07 00:00:00                )            [MCustomer] => Array                (                    [customer_name] => 株式会社コベコン.エアーテクノ                )            [MMachine] => Array                (                    [initial] => BC-                )        )

To be like this: 

    [0] => Array        (            [parts_loading_and_unloading_id] => 80660            [loading_and_unloading_day] => 2004-05-07 00:00:00            [customer_name] => 株式会社コベコン.エアーテクノ            [initial] =>         )    [1] => Array        (            [parts_loading_and_unloading_id] => 80661            [loading_and_unloading_day] => 2004-05-07 00:00:00)            [customer_name] => 株式会社コベコン.エアーテクノ            [initial] => BC-        )

 Can anyone help help me?

CPU: Intel Core i5 3570K ( raped to 4.4Ghz) | Motherboard: Gigabyte GA-Z77X-UD3H | RAM: Corsair Vengeance 8GB | GPU: ASUS GTX 980 Strix


Case: Fractal Design DefineR3Storage: 256GB Crucial MX100 & 1TB Samsung Whatevs | Display(s): ASUS MG279Q1x Cheap LG Shit


PSU: Corsair HX650 or something | Cooling: Corsair H80i | Keyboard: Ducky Shine 3 | Mouse: Roccat Kone Pure | Sound: SoundBlaster Recon3D PCI-e

Link to comment
Share on other sites

Link to post
Share on other sites

Oops Nevermind everyone! I have done it using array_merge_recursive.... LOL

CPU: Intel Core i5 3570K ( raped to 4.4Ghz) | Motherboard: Gigabyte GA-Z77X-UD3H | RAM: Corsair Vengeance 8GB | GPU: ASUS GTX 980 Strix


Case: Fractal Design DefineR3Storage: 256GB Crucial MX100 & 1TB Samsung Whatevs | Display(s): ASUS MG279Q1x Cheap LG Shit


PSU: Corsair HX650 or something | Cooling: Corsair H80i | Keyboard: Ducky Shine 3 | Mouse: Roccat Kone Pure | Sound: SoundBlaster Recon3D PCI-e

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×