Sometimes, when I fetch something, I get the following array:
Array (
[0] => Array (
[0] => 3803
)
[1] => Array (
[0] => 3855
)
[2] => Array (
[0] => 3855
)
[3] => Array (
[0] => 3855
)
[4] => Array (
[0] => 3856
)
)
But, what I actually need is:
Array ( [0] => 3803 [1] => 3855 [2] => 3855 [3] => 3855 [4] => 3856 )
So, I do this:
$new_array = array();
foreach ($array as $data)
{
array_push($new_array,$data[0]);
}
I'm not sure, if there is a better way. Maybe without making a new array?
Thanks for your thoughts!