note 66837 modified in function.array-diff-assoc by danbrown

From: Date: Sat, 14 Mar 2009 14:52:18 +0000
Subject: note 66837 modified in function.array-diff-assoc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151901@lists.php.net to get a copy of this message
NOTE: the diff_array also removes all the duplicate values that match to the values in the second array: <?php $array1 = array("a","b","c","a","a"); $array2 = array("a"); $diff = array_diff($array1,$array2); // yields: array("b","c") the duplicate "a" values are removed ?> --was-- NOTE: the diff_array also removes all the duplicate values that match to the values in the second array: <? $array1 = array("a","b","c","a","a"); $array2 = array("a"); $diff = array_diff($array1,$array2); // yields: array("b","c") the duplicate "a" values are removed ?> http://php.net/manual/en/function.array-diff-assoc.php

« previous php.notes (#151901) next »