8 Replies Latest reply on Jul 3, 2008 1:18 PM by Scooby_Doobie_Doo

    Compare Array Value to another Array Value?

    Scooby_Doobie_Doo
      I have two arrays. Both 2 dimensional. The first one contains a list of names. The 2nd array contains the ID of the first array, followed with a 2nd data field. The 2nd Array can have multiple entries tied back to single ID in the first.

      For example
      Array 1

      1 Tommy
      2 Suzie
      3 Billy

      Array 2
      1 MOVIES
      2 CHEESE
      1 DOGS
      1 CATS


      What I need to do is compare the first and second array and make sure that the 2nd has an entry for every entry in the first. So that no matter how many entries are in the 2nd array, there is at least 1 per entry, one 1 entry, one 2 and one 3 entry. I can't figure out how to do this.

      I know my lenght of the first using arraylen(array)

      but that doesn't help because the 2nd array can be larger and may only contain one id or two, and I need to verify it has all three. Anyone have any ideas on how to accomplish this?