Ok I have the following functions that checks $array for duplicate values and returns an array containing the keys of duplicates :
function unique_events($array){
$count= array_intersect_assoc($array, array_flip( array_count_values($array)));
foreach($array as $key=>$value){
if (in_array($value,$count)){
$return[$value][]=$key;
}
}
return $return;
}
The function will work properly with the following array:
Array ( [0] => Cadence Healthcare,Montreal,Canada [1] => Merck,Montreal,Canada [2] => Cadence Healthcare,Montreal,Canada )
but not with this one:
Array ( [0] => Cadence Healthcare,Montreal,Canada [1] => Cadence Healthcare,Montreal,Canada [2] => Pfizer,Paris,France )
I'm confused why!?!? :bemused: