How to find all indices of an associative array

In reply to mseyunni:
I believe you should be using unique_index(), not unique().