Skip to content
Advertisement

How can I remove duplicate record in php (Array unique)

I have an array of records and I want to remove the duplicate record. I know we can use array_unique() to remove duplicate value but in my case I have an array of records like(Date, Url, xyz). I want to skip the date column while checking the duplicate record.

You can check my code bellow.

JavaScript

You can check that i have 5 same records just the date is different so I just need one record like

JavaScript

I hpoe you can understand. If you have anyother question please comment bellow Thanks!

Advertisement

Answer

This code works for me please try this code.

JavaScript

Hope this will help you.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement