Question: I need to remove the outer key from array and reindex the left array. I have array in this format:

```
Array (
    [0] => Array (
        [0] => Array(
            [id] => 123
        ),
        [1] => Array ( 
            [id] => 144
        )
    ),
    [1] => Array (
        [0] => Array (
            [id] => 354
        )
    )
)

```

I want to format this to this one:

```
Array (
    [0] => Array (
        [id] => 123
    ),
    [1] => Array ( 
        [id] => 144
    ),
    [2] => Array (
        [id] => 354
    )
)

```

Answer: 
You can use a splat operator [PHP 5.6+]

```
$result = array_merge(...$array);

```
Please try my custom function and get your results.

```
print_r(array_fun($your_array_variable));

function array_fun($c) { 
    if (!is_array($c)) { 
        return FALSE; 
    } 
    $result = array(); 
    foreach ($c as $key => $value) { 
        if (is_array($value)) { 
            $result = array_merge($result, array_fun($value)); 
        } else { 
            $result[][$key] = $value; 
        } 
    }
    return $result; 
}

```