Hi all
I have 2 arrays that need to be compared and the number of matched values is what i need to retrieve.
array 1 might look like this:
Array
(
[0] => 'A'
[1] => 'B'
[2] => 'C'
[3] => 'D'
[4] => 'E'
[5] => 'F'
)
and array 2 might look like this:
Array
(
[0] => 'A'
[1] => 'A'
[2] => 'C'
[3] => 'D'
)
What is the best/quickest way to compare the key/values of each array and then return the number of matches? (Where in my example above I would expect the number of matches returned to be 3)
If someone could provide an example of this it would be even more helpful but I am happy to look it up with some guidance.
regards
Doug