The following array contains entries for a competition. Some participants are shown more than others, hence the times they participate into this.
For example "pounho" has better chances than "vinylin". This is why he has more occurences than "vinylin" in the array.
My question is how to select 3 results out of the following example array, but the results must be unique, no repetitions?
Because currently, I can show 3 results, but there is repetition, for example
deou, deou, pounho
.
I don't want to remove duplicates. I want the code to take into consideration that the participant "pounho" has better chances than "vinylin".
Array
(
[0] => pounho
[1] => pounho
[2] => pounho
[3] => panony
[4] => mamich
[5] => Deou
[6] => Deou
[7] => vinylin
[8] => laids
[9] => laids
)