I have an associative array of headers and I need to throw an exception if there are duplicate values:
Array
(
[0] => Email
[1] => Name
[2] => Something
[3] => Else
[4] => Email
)
What's the best way to catch that there are two or more Email
values? array_values
is not getting the values. I don't want array_unique
, as I want to abort if there are multiples.