SyntaxFix
Write A Post
Hire A Developer
Questions
Find this useful solution
function get_duplicates( $array ) { return array_unique( array_diff_assoc( $array, array_unique( $array ) ) ); }
After that count result if greater than 0 than duplicates else unique.