PHP Array Of Canadian States

Use the following array to print out a list of Canadian states, also know as provinces.

$canadian_states = array( 
    "BC" => "British Columbia", 
    "ON" => "Ontario", 
    "NL" => "Newfoundland and Labrador", 
    "NS" => "Nova Scotia", 
    "PE" => "Prince Edward Island", 
    "NB" => "New Brunswick", 
    "QC" => "Quebec", 
    "MB" => "Manitoba", 
    "SK" => "Saskatchewan", 
    "AB" => "Alberta", 
    "NT" => "Northwest Territories", 
    "NU" => "Nunavut",
    "YT" => "Yukon Territory"
);

Here is the same array, but with the French versions of the states.

$canadian_states = array( 
    "AB" => "Alberta",
    "BC" => "Colombie-Britannique",
    "MB" => "Manitoba",
    "NB" => "Nouveau-Brunswick",
    "NL" => "Terre-Neuve-et-Labrador",
    "NS" => "Nouvelle-Écosse",
    "NT" => "Territoires du Nord-Ouest",
    "NU" => "Nunavut",
    "ON" => "Ontario",
    "PE" => "Île-du-Prince-Édouard",
    "QC" => "Québec",
    "SK" => "Saskatchewan",
    "YT" => "Yukon"
);

Comments

Some corrections for your Canadian provinces and territories array: Newfoundland should be "NL" => "Newfoundland and Labrador" and you're missing: "NU" => "Nunavut"Canadian subnational postal abbreviations
Permalink
Thanks for the info and the link. I have updated the post.
Name
Philip Norton
Permalink
Thanks man!
Permalink
You forgot to add commas at the end of each line ... but thanks anyway!
Permalink
Oops, sorry about that. Sorted now! :)
Name
Philip Norton
Permalink
One more comma needed! Line 13 after "Nunavut"
Permalink
Oops. Thanks! corrected now :)
Name
Philip Norton
Permalink

Thanks for the arrays. Just FYI, they are never referred to as "states". It's "provinces" and "territories".

Permalink

Thanks for pointing that out Christina 🙂

Name
Philip Norton
Permalink

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
2 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.