3 回答
TA贡献1841条经验 获得超3个赞
您可以array_merge用来将它们合并为一个array
$arr1 = Array
(
'0' => Array
(
'Date' => '2019-05-04 18:40:00',
'Item' => 'Prasanta Kumar Ray',
'Code' => '',
'Amount' => 150
),
'1' => Array
(
'Date' => '2019-05-04 21:23:00',
'Item' => 'Dr Praveenkumar',
'Code' => '',
'Amount' => 150
)
);
$arr2 = Array
(
'0' => Array
(
'Date' => '2019-05-04 18:45:00',
'Item' => 'TC DC ESR',
'Code' => '',
'Amount' => 60
)
);
$res = array_merge($arr1,$arr2);
输出
Array
(
[0] => Array
(
[Date] => 2019-05-04 18:40:00
[Item] => Prasanta Kumar Ray
[Code] =>
[Amount] => 150
)
[1] => Array
(
[Date] => 2019-05-04 21:23:00
[Item] => Dr Praveenkumar
[Code] =>
[Amount] => 150
)
[2] => Array
(
[Date] => 2019-05-04 18:45:00
[Item] => TC DC ESR
[Code] =>
[Amount] => 60
)
)
- 3 回答
- 0 关注
- 134 浏览
添加回答
举报