I have an array like following.It is combination of both numeric key and associate key.
[0] => Array
(
[test] => Array
(
[a] => lorem
[id] => 2
)
[0] => Array
(
[b] => 2
)
)
Desired Array
[0] => Array
(
[0] => Array
(
[a] => lorem
[id] => 2
[b] => 2
)
)
How can i convert this array into numeric array like following(best way). Although I have convert this array in desired array with use of foreach. Used method -
for($i=0;isset($array[$i]);$i++){
$temp[$i]=$array[$i]['test'];
$temp[$i]['b']=$array[$i][0]['b'];
}