给定以下数组:
Array
(
[0] => Array
(
[id_contract] => 1
[contract_months] => 5
[months_with_expenses] => 1
)
[1] => Array
(
[id_contract] => 2
[contract_months] => 12
[months_with_expenses] => 0
)
[2] => Array
(
[id_contract] => 3
[contract_months] => 1
[months_with_expenses] => 1
)
)
如何从数组中删除键“contract_months”与键“month_with_expenses”不匹配的所有元素?
我正在使用 PHP。