我需要删除所有具有 0 值的月份,只有当所有月份都匹配 0 时才必须删除它。
这是我的数组,
Array
(
[0] => Array
(
[0] => Month/Year
[1] => BRO002
[2] => SPI001
[3] => TYN001
)
[1] => Array
(
[0] => Jan
[1] => 0
[2] => 0
[3] => 1
)
[2] => Array
(
[0] => Feb
[1] => 0
[2] => 0
[3] => 0
)
[3] => Array
(
[0] => Mar
[1] => 0
[2] => 0
[3] => 0
)
[4] => Array
(
[0] => Apr
[1] => 0
[2] => 0
[3] => 0
)
[5] => Array
(
[0] => May
[1] => 0
[2] => 3
[3] => 0
)
[6] => Array
(
[0] => Jun
[1] => 0
[2] => 0
[3] => 0
)
[7] => Array
(
[0] => Jul
[1] => 0
[2] => 0
[3] => 0
)
[8] => Array
(
[0] => Aug
[1] => 0
[2] => 0
[3] => 0
)
[9] => Array
(
[0] => Sep
[1] => 11
[2] => 1
[3] => 2
)
[10] => Array
(
[0] => Oct
[1] => 0
[2] => 0
[3] => 0
)
[11] => Array
(
[0] => Nov
[1] => 0
[2] => 0
[3] => 0
)
[12] => Array
(
[0] => Dec
[1] => 0
[2] => 0
[3] => 0
)
)
上面的数组将变成以下,
Array
(
[0] => Array
(
[0] => Month/Year
[1] => BRO002
[2] => SPI001
[3] => TYN001
)
[1] => Array
(
[0] => Jan
[1] => 0
[2] => 0
[3] => 1
)
[5] => Array
(
[0] => May
[1] => 0
[2] => 3
[3] => 0
)
[9] => Array
(
[0] => Sep
[1] => 11
[2] => 1
[3] => 2
)
)
谢谢你。