Organizational Research By

Surprising Reserch Topic

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 

asked Sep 13, 2013 in Java Interview Questions by ashish singh
edited Sep 12, 2013
0 votes

Related Hot Questions

Government Jobs Opening