What is the best practice for storing and accessing multiple variables like the 16 Bundesländer in PHP?

When storing and accessing multiple variables like the 16 Bundesländer in PHP, it is best practice to use an associative array where the key is the name of the Bundesland and the value is the corresponding data. This allows for easy retrieval and manipulation of the data based on the Bundesland name.

// Storing the 16 Bundesländer in an associative array
$bundeslaender = array(
    "Schleswig-Holstein" => "Kiel",
    "Hamburg" => "Hamburg",
    "Niedersachsen" => "Hannover",
    "Bremen" => "Bremen",
    "Nordrhein-Westfalen" => "Düsseldorf",
    "Hessen" => "Wiesbaden",
    "Rheinland-Pfalz" => "Mainz",
    "Baden-Württemberg" => "Stuttgart",
    "Bayern" => "München",
    "Saarland" => "Saarbrücken",
    "Berlin" => "Berlin",
    "Brandenburg" => "Potsdam",
    "Mecklenburg-Vorpommern" => "Schwerin",
    "Sachsen" => "Dresden",
    "Sachsen-Anhalt" => "Magdeburg",
    "Thüringen" => "Erfurt"
);

// Accessing the capital city of Bayern
echo "The capital city of Bayern is " . $bundeslaender["Bayern"];