I am Having an mutidimensional array getting result like given below
Array
(
[0] => Array
(
[0] => 70
)
[1] => Array
(
[0] => 67
)
[2] => Array
(
[0] => 75
[1] => 73
[2] => 68
)
[3] => Array
(
[0] => 68
)
[4] => Array
(
[0] => 76
)
)
But I need to convert it to single array
And I want to convert in to single dimensional array as
Array
(
[0] => 70
[1] => 67
[2] => 75
[3] => 73
[4] => 68
[5] => 68
[6] => 76
)
How to convert it using php functions?
Or Is there any other way to do it?
You can try
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($data));
$l = iterator_to_array($it, false);
var_dump($l); // one Dimensional
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With