Array
(
[0] => Array
(
[param1] => A0145
[param2] => Sant Cugat Monastery and Wine Cellar
)
[1] => Array
(
[param1] => A0150
[param2] => Collserola La Rierada to Escaletes and El Papiol
)
)
Array
(
[0] => Array
(
[param1] => Location
[param2] => Tibidabo
)
[1] => Array
(
[param1] => Location
[param2] => Parc Collserola
)
)
I have the two arrays above. I would like to merge them like shown below: I have tried array_push and array_merge without success. Note that the arrays will vary in lenght. Some might have 0 keys others may have 3, 4 5 etc. Note that in the real world example, each sub-array has 8 named keys, i.e. param1, param2, param3 etc. This is a fixed amount.
with array_push and array_merge it is creating the firs array with a key of 0 and the second array with a key of 1. What I want is one array only with all the sub array contents having sequential key numbers. Like append contents of array 1 into array 0 and re-index the numerical keys.
Does this make any sense? It has been baffling me for some while now.
Array
(
[0] => Array
(
[param1] => A0145
[param2] => Sant Cugat Monastery and Wine Cellar
)
[1] => Array
(
[param1] => A0150
[param2] => Collserola La Rierada to Escaletes and El Papiol
)
[2] => Array
(
[param1] => Location
[param2] => Tibidabo
)
[3] => Array
(
[param1] => Location
[param2] => Parc Collserola
)
)