My array is like the one below
Array
(
[0] => Array
(
[cwgetOptionsResponse] => Array
(
[cwdetails] => Array
(
[cwNameDetail] => Array
(
[cwName] => Array
(
[cwNameId] => 1
)
[cwPostCode] => PDP/E225
[cwPrints] => Array
(
[cwSurname] => 1088138401
[cwColourStatus] => passed
)
)
)
)
)
)
I am looking to remove cwgetOptionsResponse, cwdetails and cwNameDetail to get an array like the one below. I have tried array_shift but this removes the outer elements. Is there any way to remove the arrays by keys?
Array
(
[0] => Array
(
[cwName] => Array
(
[cwNameId] => 1
)
[cwPostCode] => PDP/E225
[cwPrints] => Array
(
[cwSurname] => 1088138401
[cwColourStatus] => passed
)
)
)