我想過濾並從數組中刪除一個項目。是否有可能用array_filter()做到這一點?如何使用過濾器從數組中刪除項目?
//I want to delete these items from the $arr_codes
$id = 1223;
$pin = 35;
//Before
$arr_codes = Array('1598_9','1223_35','1245_3','1227_11', '1223_56');
//After
$arr_codes = Array('1598_9','1245_3','1227_11', '1223_56');
謝謝!
您的標準是動態的,還是總是'$ id = 1223'和'$ pin = 35'? – 2011-05-25 02:05:46
動態對象,這只是一個例子。 – Racooon 2011-05-25 02:07:35