PHP Array Combination Best Method

CVRoss

New Member
given the following arrays in php, how can i best merge them together\[code\]$masterkeys = array('Key1','Key2');$settings_foo = array( array('ID'=>'Key1', 'Foo_Setting'=>'SomeValue'));$settings_bar = array( array('ID'=>'Key1', 'Bar_Setting'=>'SomeOtherValue')); \[/code\]in the end I need $masterkeys to be the combination of each of the settings_[foo|bar] arrays. \[code\]Array( ['Key1'] = Array('Foo_Setting'=>'SomeValue','Bar_Setting'=>'SomeOtherValue') );\[/code\]I do know I can use a couple foreach loops on this, but just wondering if there are a couple PHP array functions that can splice them together.
 
Back
Top