Menu Riverview Church

ARRAY_INTERSECT_KEY

Computes the intersection of arrays using keys for comparison

SYNTAX

array_intersect_key ( array $array1 , array $array2 [, array $... ] ) : array

PARAMETERS

array1

The array with master values to check.

array2

An array to compare values against.

...

A variable list of arrays to compare.

RETURN

Returns an associative array containing all the entries of array1 which have keys that are present in all arguments.

EXAMPLES

ARRAY1 ARRAY2

Array
(
    [a] => 0
    [b] => 1
)

...

Array
(
    [a] => 0
    [b] => 1
)

PHP