in reply to matching an array
Have you looked at How do I compute the difference of two arrays? How do I compute the intersection of two arrays?? Also Delete from array has some interesting comments on this sort of thing..