I have an multidimensional array but need to make it smaller. This is an easy question I believe. I need to remove 1 array in jsonresult array, the first one but preserve the other in the next array. I have tried array_splice but it only keeps one.
Array
(
[searchword] => search word
[jsonresult] => Array
(
[0] => Array // THIS ONE, KEEP ITS CHILDREN MOVE UP
(
[0] => Array
(
[id] => 14889770
)
[1] => Array
(
[id] => 14389720
)
[2] => Array
(
[id] => 14869723
)
)
[1] => Array // THIS ONE, KEEP ITS CHILDREN MOVE UP
(
[0] => Array
(
[id] => 14889722
)
[1] => Array
(
[id] => 14389711
)
[2] => Array
(
[id] => 14869329
)
)
)
)
Would like to get:
Array
(
[searchword] => search word
[jsonresult] => Array
(
[0] => Array
(
[id] => 14889770
)
[1] => Array
(
[id] => 14389720
)
[2] => Array
(
[id] => 14869723
)
[3] => Array
(
[id] => 14889722
)
[4] => Array
(
[id] => 14389711
)
[5] => Array
(
[id] => 14869329
)
)
)