<?php
function printStr($str){
                for($x=0;$x<count($str);$x++){
                        echo $str[$x];
                        echo "<br>";
                }
                echo "end";
                echo "<br>";
        }  
 $array1 = array ("green","red","yello");
 $array2 = array ("green", "blue","red");
  
  $result1 = array_intersect ($array1, $array2);  $array3 = array ("green","yello","red");
  $array4 = array ("green", "blue","red");  $result2 = array_intersect ($array3, $array4);printStr($result1);
printStr($result2);
?>
结果为什么是:
green
red
end
green
end