array_diff

(PHP 4 )

array_diff -- SpoΦφtat rozdφl polφ

Popis

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

array_diff() vracφ pole obsahujφcφ v╣echny hodnoty z array1, kterΘ se nevyskytujφ v ╛ßdnΘm z dal╣φch argument∙. KlφΦe jsou zachovßny.

P°φklad 1. Ukßzka array_diff()

$array1 = array ("a" => "green", "red", "blue");
$array2 = array ("b" => "green", "yellow", "red");
$result = array_diff ($array1, $array2);

$result obsahuje array ("blue");

Viz takΘ: array_intersect().