Array
(
[1709115930244442] => Array
(
[id] => 118
[type] => 1
[prompt] => Design a pair of earrings
[category_id] =>
[style_id] =>
[upload_image] =>
[image] => https://image.jewelryhunt.net/zhaowu/20240229/51e89aae7c70d153fe58bcb6a3b17bc5.png
[image_id] => 1709166936353149
[image_id_pid] => 1709115930244442
[size_id] => 1
[createtime] => 1709166936
)
[1709101780997618] => Array
(
[id] => 92
[type] => 1
[prompt] => Design a necklace
[category_id] =>
[style_id] =>
[upload_image] =>
[image] => https://image.jewelryhunt.net/zhaowu/20240228/8dd8d95230c5bd0cb1711f460460f9cd.png
[image_id] => 1709108628735260
[image_id_pid] => 1709101780997618
[size_id] =>
[createtime] => 1709108628
)
[1709078780835198] => Array
(
[id] => 39
[type] => 1
[prompt] => Design a 90s inspired ring.
[category_id] =>
[style_id] =>
[upload_image] =>
[image] => https://image.jewelryhunt.net/zhaowu/20240228/1c89e90ea6e69fb1f17b28a618cf7ff3.png
[image_id] => 1709081737985906
[image_id_pid] => 1709078780835198
[size_id] =>
[createtime] => 1709081738
)
)
Array
(
[1709115930244442] => Array
(
[images] => Array
(
[0] => https://image.jewelryhunt.net/zhaowu/20240229/cf3c0764b8da63d25b89b17ea79021dd.png
[1] => https://image.jewelryhunt.net/zhaowu/20240229/51e89aae7c70d153fe58bcb6a3b17bc5.png
)
)
[1709101780997618] => Array
(
[images] => Array
(
[0] => https://image.jewelryhunt.net/zhaowu/20240228/8dd8d95230c5bd0cb1711f460460f9cd.png
)
)
[1709078780835198] => Array
(
[images] => Array
(
[0] => https://image.jewelryhunt.net/zhaowu/20240228/a458f33de011504fe1cf0a3062593326.png
[1] => https://image.jewelryhunt.net/zhaowu/20240228/1c89e90ea6e69fb1f17b28a618cf7ff3.png
)
)
)
数组key 做判断拼接
//循环判断key一样重新组合数据
foreach ($list_new_b as $key=>$val) {
foreach ($list_new_a as $k=>$v) {
if ($key == $k){
$list_new_b[$key]['images'] = $v['images'];
}
}
}