in reply to Comparing two arrays

There surely is.

  1. Loop over each value in array1
  2. For each of these loop over each value in array2
  3. Inside the two nested loops you can compare every possible pair of values. See if the value from array1 is divisible by the value from array2
  4. ...
  5. Profit!