I have 2 arrays with different number of elements, the case is, I want get show the same element have the 2 arrays.
For Example :
$search_terms="house,car,boy,table";
$cats="1,2,3,4,car,boy,fly,girl";
$explode_term=explode(",",$search_terms);
$explode_tags=explode(",",$cats);
$compare=array_diff_assoc($explode_term, $explode_tags);
foreach ($compare as $compa)
{
print $compa;
print "<br>";
}
As you can see I have 2 arrays and only have some elements in common, by this I want to get the element it´s the same in both cases.