I have two arrays as follows:-
$a = ["2","11","6"];
$b = ["6","7"];
$c = array_diff($a, $b);
$c = ["2","11"];
The result in $c
is wrong. I want the result should be as $c = [6]
in other words i want the common elements in both array be returned! but it is giving wrong error. Kindly help me?