I would like to the most effective way to get the position of repeated elements element in array. For example, if i have:
$example = array('a','b','c','a','a','d');
So in this case 'a' is at position 0 - 3 - 4.
I know we can loop through but i think in it is ineffective. I would be grateful if you could show me a better way to do this.
Thank you very much