foreach ($skuList as $sku) { $productToSkuMap[$sku['product_id']][] = $sku; } 转载于:https://www.cnblogs.com/cjjjj/p/10391377.html