I have an array which looks like this
Array
(
[0] => Array
(
[0] => RANO17
[1] => RANO99
)
[1] => Array
(
[0] => Test Product Ranosys
[1] => Rano test example
)
[2] => Array
(
[0] => 7
[1] => 2
)
[3] => Array
(
[0] =>
[1] =>
)
[4] => Array
(
[0] => 200.0000
[1] => 100.0000
)
[5] => Array
(
[0] =>
[1] =>
)
[6] => Array
(
[0] => 1400
[1] => 200
)
)
I want to make 1D array from above array. 1D array looks like.
Array(
[0] => Array
(
[0] => RANO17
[1] => Test Product Ranosys
[2] => 7
[3] =>
[4] => 200.0000
[5] =>
[6] => 1400
)
[1] =>Array
(
[0] => RANO99
[1] => Rano test example
[2] => 2
[3] =>
[4] => 100.0000
[5] =>
[6] => 200
)
)
I don't have any idea how can we do this I was googling from last two hours but didn't get any solution yet. How can we do this either using some array functions or any programming logic please help.
foreach
orarray_map
. There aren't any existing functions that will do exactly what you want, out of the box..