1
我已經搜索並嘗試了許多不同的「從數組中刪除重複」功能,但沒有人爲我的情況制定出來。我試圖從數組中刪除一個特定的重複。從數組中刪除特定的重複鍵值
從下面我想刪除「PHASER 4600」的重複。
[0] => Array
(
[id] => 1737
[product_name] => PHASER 4200
[certification_date] => 3/20/12
)
[1] => Array
(
[id] => 1738
[product_name] => PHASER 4600
[certification_date] => 3/20/12
)
[2] => Array
(
[id] => 1739
[product_name] => PHASER 4600
[certification_date] => 3/20/12
)
[3] => Array
(
[id] => 1740
[product_name] => PHASER 4700
[certification_date] => 3/20/12
)
[4] => Array
(
[id] => 1741
[product_name] => PHASER 4800
[certification_date] => 3/20/12
)
你說你已經嘗試了各種東西,但不顯示你的工作。請添加一些代碼,以便我們提供幫助。關於這個問題,[array_filter()](http://php.net/array_filter)可能會有所幫助。 –
從哪裏得到這個數組 – kannan
我相信這是awnsered [這裏](http://stackoverflow.com/questions/307674/how-to-remove-duplicate-values-from-a-multi-dimensional-array-in -php) – Mazaka