Thursday, April 23, 2009 - 13:42
Use the following array to print out a list of Canadian states, also know as provinces.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $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" ); |
Category:
Comments
Submitted by Eric (not verified) on Tue, 05/05/2009 - 16:21 Permalink
Submitted by kido (not verified) on Wed, 10/30/2013 - 14:15 Permalink
Thanks man!
Submitted by jell0wed (not verified) on Tue, 07/01/2014 - 21:57 Permalink
You forgot to add commas at the end of each line ... but thanks anyway!
Submitted by Craig (not verified) on Mon, 12/22/2014 - 05:28 Permalink
One more comma needed! Line 13 after "Nunavut"
Add new comment