這是我在print_r我的數組時獲得的結果。它是一個包含以下值的多維數組。如果數組值等於0,則刪除條目
[7] => Array
(
[0] => 1
[1] => 34
[2] => 181
[3] => 50
)
[9] => Array
(
[0] => 1
[1] => 2
[2] => 1
[3] => 47
)
[2] => Array
(
[0] => 20
[1] => 0
[2] => 1621
[3] => 45
)
[3] => Array
(
[0] => 120
[1] => 0
[2] => 121
[3] => 45
)
我想刪除其中的關鍵[1]等於0做修改後的所有條目,我的最後一個數組應該喜歡這個
[7] => Array
(
[0] => 1
[1] => 34
[2] => 181
[3] => 50
)
[9] => Array
(
[0] => 1
[1] => 2
[2] => 1
[3] => 47
)
任何想法?
快速,乾淨。非常感謝 – user3172841