Link to home
Start Free TrialLog in
Avatar of deharvy
deharvy

asked on

Removing Duplicate Keys from Multiple Arrays

array_unique can be used to remove duplicate key value sets from an array.

How do I remove duplicate key values sets by comparing multiple arrays?
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Give us some example inputs and expected outputs.  It matters whether the array keys are numeric or associative.
The exact definition of "remove" also matters.  Do you want to eliminate duplicates from all of the arrays?  Or do you want to keep only one copy in one of the arrays?  Do you want to test for duplicate keys, or duplicate values or duplicate key=>value pairs?  
Avatar of deharvy
deharvy

ASKER

Ray,

I only want to test for duplicate values. The key doesn't matter.

So, when I do a print_r, it should only display one key with a unique value.

Hope this is more clear.
Please give us some example inputs and expected outputs, thanks.  Like how many arrays are involved, and whether the keys are associative or numeric?  Thanks, ~Ray