时间:2021-07-01 10:21:17 帮助过:7人阅读
//数组a:
array (
0 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '2X15',
'part_count' => '0',
),
1 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '2Z25',
'part_count' => '5',
),
)
//数组b:
array (
0 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '2Z15',
'part_count' => '100',
),
1 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '3115',
'part_count' => '28',
),
)
array (
0 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '2X15',
'part_count' => '0',
),
1 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '2Z15',
'part_count' => '105',
),
2 =>
array (
'cust_no' => '310F6 1VA5A',
'lotno' => '3115',
'part_count' => '28',
),
)
$t=array();
foreach(array_merge($a,$b) as $v){
if(!isset($t[$v['cust_no'].'_'.$v['lotno']])){