Sorting the capital array

the following demonstrates the output from the print_r sttm:
Array
(
    [TX] => Austin
    [CA] => Sacramento
    [OR] => Salem
)

start traversing:
1) Austin
2) Sacramento
3) Salem
x) Austin -- reset
x) Salem -- end
x) Sacramento -- (prev)ious