php - Merge multidimesional and associative arrays -


i'm trying merge 2 given arrays new one:

first array:

array (     [0] =>; array         (             [label] => please choose             [value] => default         )  ) 

second array:

array (     [label] => 14.09.2013 - 27.09.2013 - 3.299 €     [value] => 14.09.2013 - 27.09.2013 ) 

i want generate arrays looks this:

array (     [0] => array         (             [label] => please choose             [value] => 14.09.2013 - 27.09.2013         ),     [1] => array         (             [label] => 14.09.2013 - 27.09.2013 - 3.299 €             [value] => 14.09.2013 - 27.09.2013         )  ) 

i tried merge arrays:

array_merge($array1,$array2); 

which results in:

array (     [0] => array         (             [label] => please choose             [value] => default         )      [label] => 14.09.2013 - 27.09.2013 - 3.299 €     [value] => 14.09.2013 - 27.09.2013 ) 

what appropriate function use-case?

if pass in 2nd array inside array should desired output

array_merge($array1,array(1 => $array2)); 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -