我有两个具有公共键的数组,employee_id我想将name原始数组中的列插入到第二个数组中。
这是我从名为的数组变量中获得的内容: $result
Array ( [0] => Array ( [employee_id] => 14100001 [calculate_id] => 26 [salary] => 696.35416666667 [late_duration] => 2 [undertime_duration] => 3 [cola_duration] => 0 [date] => 2019-09-09 )
[1] => Array ( [employee_id] => 14100002 [calculate_id] => 26 [salary] => 350 [late_duration] => 0 [undertime_duration] => 0 [cola_duration] => 0 [date] => 2019-09-09 )
[2] => Array ( [employee_id] => 14100003 [calculate_id] => 26 [salary] => 358.75 [late_duration] => 0 [undertime_duration] => 0 [cola_duration] => 2 [date] => 2019-09-09 )
[3] => Array ( [employee_id] => 14100004 [calculate_id] => 26 [salary] => 385 [late_duration] => 0 [undertime_duration] => 0 [cola_duration] => 8 [date] => 2019-09-09 )
[4] => Array ( [employee_id] => 14100005 [calculate_id] => 26 [salary] => 380.625 [late_duration] => 0 [undertime_duration] => 0 [cola_duration] => 7 [date] => 2019-09-09 ) )
这是我的另一个名为的数组变量: $this->data_emp
Array ( [0] => Array ( [employee_id] => 14100001 [name] => John Doe )
[1] => Array ( [employee_id] => 14100002 [name] => John Dark )
[2] => Array ( [employee_id] => 14100003 [name] => John Die )
[3] => Array ( [employee_id] => 14100004 [name] => Liza Dark )
[4] => Array ( [employee_id] => 14100005 [name] => Jane Dark )
[5] => Array ( [employee_id] => 14100006 [name] => Elisse Dark ) )
临摹微笑