顶层的产品数组是$csv. 在下面的摘录中,数字 [584],[585] 代表下一个数组级别$product=>$data_col如下所示:
[584] => Array
(
[No_] => II14511
[Manufacturer ID] => CLT-M504S
[Description] => SAM CON CLT-M504S
[LQ Price] => 120.00000000000000000000
[Retail Price Incl_ GST] => 171.60000000000000000000
[AvailableQty] => 0.00000000000000000000
[Rocklea] => 0.00000000000000000000
[Sydney] =>
[Net Weight] => 0.50000000000000000000
[Item Category Code] => SAM
[Product Group Code] => CON
[Minor Category 1] => TONER
[Minor Category 2] => #
[Vendor Name] => Samsung
[Vendor URL] => www.samsung.com.au
[Item URL] =>
[Warranty] =>
[Dimension] =>
[EAN Barcode] => 8806085031999
[Description1] => Samsung CLT-M504S, SEE toner for CLP-415/ CLX-4195 Series LBP & MFP - Magenta Toner 1800 pages<br />
[Image] => https://auscompcomputers.com/uploads/image/SAM-CON-CLT-M504S.jpg
)
[585] => Array
(
[No_] => II14772
[Manufacturer ID] => DK-22205
[Description] => BRO CON LABELROLL-DK-22205
[LQ Price] => 25.00000000000000000000
[Retail Price Incl_ GST] => 35.75000000000000000000
[AvailableQty] => 0.00000000000000000000
[Rocklea] => 0.00000000000000000000
[Sydney] => 0.00000000000000000000
[Net Weight] => 0.50000000000000000000
[Item Category Code] => BRO
[Product Group Code] => CON
[Minor Category 1] => CON-LABEL-ROLL
[Minor Category 2] => #
[Vendor Name] => Brother
)
因此,我有一个具有结构的数组$csv as $product as $data_col => $value
但是,我想$data_col参考通缉列表选择性地删除一些数组$data_col,我将其称为$wanted_data_cols.
它似乎不会导致整个阵列发生变化。您能否建议如何进行这项工作,或者如果您觉得您有一个可以实现相同目标的卓越解决方案,我会接受。
牛魔王的故事