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");

Share:

  • Add news feed
  • Bookmark this on Delicious

Comments

Some corrections for your

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
philipnorton42's picture

Thanks for the info and the

Thanks for the info and the link. I have updated the post.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6> <pre> <span> <p> <br />
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.