in reply to Comparing two arrays
There surely is.
- Loop over each value in array1
- For each of these loop over each value in array2
- 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
- ...
- Profit!