I have this nested arrays
Array
(
[0] => Array
(
[0] => Array
(
[name] => Adam Smith
)
[ef] => Array
(
[rate] => 0
[superannuation] => 9.5
[pportable_lsl] => 0
[hours_per_day] => 0
[hours_per_week] => 0
[weeks_oer_year] => 0
)
)
)
And I want to bring all the child elements to the top level element. For example:
Array
(
[0] => Array
(
[name] => Adam Smith
[rate] => 0
[superannuation] => 9.5
[pportable_lsl] => 0
[hours_per_day] => 0
[hours_per_week] => 0
[weeks_oer_year] => 0
)
)
What is the best way to achieve this using PHP built-in functions?
0 comments:
Post a Comment