Source Code:
(back to article)
<?php function compare_strings($string1, $string2) { return strcmp($string1, $string2); } $array1 = array("apple", "orange", "banana"); $array2 = array("orange", "banana", "kiwi"); $array3 = array("banana", "kiwi", "grape"); $result = array_uintersect($array1, $array2, $array3, "compare_strings"); print_r($result); ?>
Result:
Report an issue