Hello,
I have two different arrays. Each array contains a series of numbers (1, 2, 3, 9, 7 ...etc).
How can I compare these two arrays and keep ONLY the numbers that are present in both arrays?
Furthermore, I was wondering if anyone could help me to make sure that the new array (derived from the above comparision) contains only distinct numbers (so, in other words, I don't want the array to be something like "2, 2, 3, 7, 7, 7, 7, 9". Instead I would like the array to consist of "2, 3, 7, 9".)
Thanks!
PS- Sorry about the slightly pedantic tone, but I'm freaking out over this one!