PHP - Make an associative array unique, key -> value and value -> key
问题 I have a little problem in php, which i find hard to explain in words. I have an associative array which contains key-value. I would like to make a function (or if there is already one) which would take an array as input and remove the duplicates but both ways. For example: In my array I have {a -> b} {a -> c} {b -> a} {b -> c} ... From this view it does not seem like there is any duplicate, but to me {a -> b} and {b -> a} are duplicate. So I would like the function to see it as a duplicate