Skip to content
Advertisement

How to remove duplicate values from an array in PHP

How can I remove duplicate values from an array in PHP?

Advertisement

Answer

Use array_unique().

Example:

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