The phparray_intersect () function uses code. The arrayarray_intersect (arrayarray1, arrayarray2 [, array...]) array_intersect () function returns an intersection array of two or more arrays. Array_intersect () returns an array, which is array array_intersect (array array1, array array2 [, array...])
The array_intersect () function returns the intersection array of two or more arrays.
Array_intersect () returns an array containing all values that appear in the array of all other parameters at the same time in array1. Note that the key name remains unchanged.
The following is an example in the manual:
$ Array1 = array ("a" => "green", "red", "blue ");
$ Array2 = array ("B" => "green", "yellow", "red ");
$ Result = array_intersect ($ array1, $ array2 );
Print_r ($ result );
?>
The output result is as follows:
Array
(
[A] => green
[0] => red
)
The http://www.bkjia.com/PHPjc/319826.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/319826.htmlTechArticlearray array_intersect (array array1, array array2 [, array...]) array_intersect () function returns an intersection array of two or more arrays. Array_intersect () returns an array, which is...