Answer the question
In order to leave comments, you need to log in
How to remove duplicate array values?
Good afternoon. Such a question:
Let's say there is an array
Need to convert it to
array_unique is not suitable, because$array = [1, 5, 5, 9];
[1, 5, 9]
array_unique([1, 5, 5, 9]) == [[0] => 1, [1] => 5, [3] => 9]
["1","5","9"]
{"0":"1","1":"5","3":"9"}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question