In PHP how do I add the values of [2] into the main body of the array as opposed to having it as a sub array? I've tried array_push, the + concatenator and array_merge but none work.
Array
(
[0] => 42299.37181713
[1] => Yes
[name] => Bob Smith
[country] => United Kingdom
[2] => Array
(
[0] => Name 1
[1] => Name 2
[2] => Name 3
[3] =>
)
What I am looking for / need is a way to get to the following (and I'm sure there's a simply/correct PHP way of doing it!):
Array
(
[0] => 42299.37181713
[1] => Yes
[name] => Bob Smith
[country] => United Kingdom
[2] => Name 1
[3] => Name 2
[4] => Name 3
[5] =>
Thanks for your answers - I have now posted my solution as one of the answers :)