3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 0 => array( 0 => array( 'name' => 'test1', 'country' => 'abc' ), 1 => array( 'name' => 'test2', 'country' => 'xyz' ) ), 1 => array( 'name' => 'test3', 'country' => 'pqr' ), 2 => array( 0 => array( 'name' => 'test1', 'country' => 'abc' ), 1 => array( 'name' => 'test2', 'country' => 'xyz' ), 2 => array( 'name' => 'test1', 'country' => 'abc' ), 3 => array( 'name' => 'test2', 'country' => 'xyz' ) ), 3 => array( 'name' => 'test3', 'country' => 'pqr' ), ); $new = []; foreach($arr as $subarr){ $new = array_merge($new, $subarr); } var_dump($new);

preferences:
25.15 ms | 405 KiB | 5 Q