I have an array contacting following words
(“hello”, “apple”, “hello”, “hello”, “apple”, “orange”, “cake”)
Result here should be 5
Can you please tell me if there is a library function in PHP that I can use to count how many duplicate words are present in my array? Any help would be greatly appreciated.