i have following array values, here spend is repeated,
$array = array('Spend','Spend','Form Conversions','Phone Conversions')
i can detect multiple entries like this
print_r(array_count_values($array));
output is
Array
(
[Spend] => 2
[Form Conversions] => 1
[Phone Conversions] => 1
)
how can i put separate condition to print as follows
if(any key(here spend) found with count = 2 )
{
echo $duplicate element; //edits
}
else
{
echo $no_duplicate_elements //edits
echo "count = 1 (here Form Conversions,Phone Conversions)";
}