PHP根据键从多维数组中删除重复项

我有一个多维数组($ array),其中的条目如下所示:
{ ["upload/example.gif"]=> array(5) { 
     ["title"]=> string(12) "This is me" 
     ["excerpt"]=> string(24) "This is a photo of a tree" 
     ["img"]=> string(42) "upload/example.gif"
     ["link"]=> string(23) "http://www.google.co.uk" 
     ["source"]=> string(6) "custom" 
   }
}
我需要能够根据键删除
$array
中的任何重复值。所以如果我的数组是:
$array = array( ["upload/example.gif"] => etc....
                ["upload/tree.gif"] => etc....
                ["upload/example.gif"] => etc....)
我可以删除其中一个
["upload/example.gif"] => etc....
数组。 我试过了:
$array = array_map('unserialize', array_unique(array_map('serialize', $array)));
但那没用。 提前致谢。     
已邀请:
netcoder正确回答了问题,我只是希望它出现在答案框中(而不是评论)。 您不能在关联数组(或任何数组)中具有重复键。它本质上是一个阵列,你可以保证拥有独特的键。 顺便说一句,如果您在不同的密钥中发现重复数据,则可以通过取消设置来删除冗余密钥。
unset($array['delete_me']);
http://php.net/manual/en/function.unset.php     

要回复问题请先登录注册