array_intersect takes two arrays and looks for matching === values and returns the result. However the values in the array have to match character for character. Is there a function or a method for comparing two arrays and looking for values that contain similar strings instead of equal similar strings. Something like stripos but with array_intersect.
$array1 = array("howdyhorse", "monkeyjoe", "bill", "donkeymonkey", "carrothorse")
$array2 = array("bill", "horse", "monkeybunk", "apple", "panda")
function($array1, $array2);
Returns an array = array("bill", "horse", "monkeyjoe")
The order is of no particular concern.
Is running all the values of each array through something like
to make everything lowercase and remove spaces and special chars and then doing an array_intersect an option?