algorithm - Array diff implementation in PHP -
does know of array diff implementation in php? need use develop feature similar way stackexchange diffs tags.
like documentation says:
compares array1 against 1 or more other arrays , returns values in array1 not present in of other arrays.
for example:
$array1 = array("a" => "green", "red", "blue", "red"); $array2 = array("b" => "green", "yellow", "red"); $result = array_diff($array1, $array2);
would end $result
containing value blue
, because in 1 of arrays.
complete documentation here: http://php.net/manual/en/function.array-diff.php
Comments
Post a Comment