How to remove all instances of duplicated values from an array

前端 未结 9 1153
心在旅途
心在旅途 2021-01-02 19:48

I know there is array_unique function, but I want to remove duplicates. Is there a built-in function or do I have to roll my own.

Example input:

9条回答
  •  無奈伤痛
    2021-01-02 20:18

    You want to remove any entries that have duplicates, so that you're left with only the entries that were unique in the list? Hmm it does sound like something you'll need to roll your own.

提交回复
热议问题