What I would like to do is return the number of times values in the first array, occur in the second array. But array_intersect() returns "Array". How do I achieve this?
Here is the example from the manual:
<?php $array1 = array ("a" => "green", "red", "blue"); $array2 = array ("b" => "green", "yellow", "red"); $result = array_intersect ($array1, $array2); echo "<pre>"; print_r( $result ); echo "</pre>"; ?>