$ Result = Array ( Array ( 'name' = & gt; 'network', 'phone' = & gt #'The 1st'=>'Program Test 1', 'The 2nd'=>'Program Test 2', ), array( 'name'=>'Network 1', 'Telephone'=>'12345678911', &
The following program can get the array you want to merge no matter how the $result key name is changed:
$arr = [];
foreach ($result as $k => $v){
foreach ($result[$k] as $k1 =>$v2){
if (is_array($result[$k][$k1])) {
foreach ($result[$k][$k1] as $k2 => $v2){
$arr[] = $v2;
}
$temp = [$arr[0] => $arr[1]];
unset ($result[$k][$k1]);
unset ($arr);
I can't help you read it because your writing is unclear.
The following program can get the array you want to merge no matter how the $result key name is changed:
$arr = [];
foreach ($result as $k => $v){
foreach ($result[$k] as $k1 =>$v2){
if (is_array($result[$k][$k1])) {
foreach ($result[$k][$k1] as $k2 => $v2){
$arr[] = $v2;
}
$temp = [$arr[0] => $arr[1]];
unset ($result[$k][$k1]);
unset ($arr);
%I can't help you read it because your writing is unclear.