i have a sortable list. when the user rearranges an item, i should know what was switched with what. i dont want an array. i just want which element switches with which. each list item already has a unique ID.

What are you using to do the sorting? Some code would be useful.