Sorting the capital array

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

accessing a key that does exist: $CAcapital: Sacramento
accessing a key that does not exist: $CAcapital:

Using the @ symbol to prevent the notice from being displayed

$CAcapital: