PHP Array Exercises : Identify the email addresses which are not unique
41. Identify Non-Unique Email Addresses
Write a PHP program to identify the email addresses which are not unique.
Sample Solution:
PHP Code:
Output:
Array ( [1] => xyz@example.com [3] => xyz@example.com )
Flowchart:

For more Practice: Solve these Related Problems:
- Write a PHP script to scan an array of email addresses and return those that appear more than once.
- Write a PHP function that takes an array of emails, identifies duplicates, and outputs them in a list.
- Write a PHP program to use array_count_values() to count email occurrences and display non-unique entries.
- Write a PHP script to compare an array of email addresses and output a boolean indicating if any duplicates exist.
Go to:
PREV : Sorted Array Without Preserving Keys.
NEXT : Unique Flattened Values from Multidimensional Arrays.
PHP Code Editor:
Contribute your code and comments through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.