Menu Riverview Church

ARRAY_DIFF

Computes the difference of arrays

SYNTAX

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

PARAMETERS

array1

The array to compare from

array2

An array to compare against

...

More arrays to compare against

RETURN

Returns an array containing all the entries from array1 that are not present in any of the other arrays.

EXAMPLES

ARRAY1 ARRAY2

Array
(
    [b] => 1
    [d] => 3
)

...

Array
(
    [b] => 1
    [d] => 3
)

PHP