Array Comparison
Posted: Tue Mar 29, 2011 8:20 pm
How does one compare two arrays?
For example--I have two arrays. I would like a simple true/false as to whether any values from array 1 appear in array 2. in_array will only search for a single value no? A loop would work I'm sure, but there has to be a more elegant way...
Thoughts? Thanks.
For example--I have two arrays. I would like a simple true/false as to whether any values from array 1 appear in array 2. in_array will only search for a single value no? A loop would work I'm sure, but there has to be a more elegant way...
Thoughts? Thanks.