I thought it was about time I shared some of the ‘femgeekier’ things I do at work. Even if they’re not that impressive. I spent about 20 minutes putting this together the other morning and thought I would share it here in case anyone is ever needs it. Its useful for adding a country drop down to Zend forms. Handy on eCommerce sites.

$this->addElement(
	'Select',
	'Country',
		array(	
		'required' => false,
		'label' => 'Country',
		'multiOptions' => array(
                    '248'=>'Aaland islands',
                    '004'=>'Afghanistan',
                    '008'=>'Albania',
                    '012'=>'Algeria',
                    '016'=>'American samoa',
                    '020'=>'Andorra',
                    '024'=>'Angola',
                    '660'=>'Anguilla',
                    '010'=>'Antarctica',
                    '028'=>'Antigua and Barbuda',
                    '032'=>'Argentina',
                    '051'=>'Armenia',
                    '533'=>'Aruba',
                    '036'=>'Australia',
                    '040'=>'Austria',
                    '031'=>'Azerbaijan',
                    '044'=>'Bahamas',
                    '048'=>'Bahrain',
                    '050'=>'Bangladesh',
                    '052'=>'Barbados',
                    '112'=>'Belarus',
                    '056'=>'Belgium',
                    '084'=>'Belize',
                    '204'=>'Benin',
                    '060'=>'Bermuda',
                    '064'=>'Bhutan',
                    '068'=>'Bolivia',
                    '070'=>'Bosnia and Herzegowina',
                    '072'=>'Botswana',
                    '074'=>'Bouvet Island',
                    '076'=>'Brazil',
                    '086'=>'British Indian Ocean Tterritory',
                    '096'=>'Brunei Darussalam',
                    '100'=>'Bulgaria',
                    '854'=>'Burkinafaso',
                    '108'=>'Burundi',
                    '116'=>'Cambodia',
                    '120'=>'Cameroon',
                    '124'=>'Canada',
                    '132'=>'Capeverde',
                    '136'=>'Cayman Islands',
                    '140'=>'Central African Republic',
                    '148'=>'Chad',
                    '152'=>'Chile',
                    '156'=>'China',
                    '162'=>'Christmas Island',
                    '166'=>'Cocos (Keeling) Islands',
                    '170'=>'Colombia',
                    '174'=>'Comoros',
                    '180'=>'Congo, Democratic Republic of (Waszaire)',
                    '178'=>'Congo, Republic of',
                    '184'=>'Cook Islands',
                    '188'=>'Costarica',
                    '384'=>'Cote dIvoire',
                    '191'=>'Croatia',
                    '192'=>'Cuba',
                    '196'=>'Cyprus',
                    '203'=>'Czech Republic',
                    '208'=>'Denmark',
                    '262'=>'Djibouti',
                    '212'=>'Dominica',
                    '214'=>'Dominican Republic',
                    '218'=>'Ecuador',
                    '818'=>'Egypt',
                    '222'=>'El Salvador',
                    '226'=>'Equatorial Guinea',
                    '232'=>'Eritrea',
                    '233'=>'Estonia',
                    '231'=>'Ethiopia',
                    '238'=>'Falkland Islands',
                    '234'=>'Faroe Islands',
                    '242'=>'Fiji',
                    '246'=>'Finland',
                    '250'=>'France',
                    '254'=>'French Guiana',
                    '258'=>'French Polynesia',
                    '260'=>'French Southern Territories',
                    '266'=>'Gabon',
                    '270'=>'Gambia',
                    '268'=>'Georgia',
                    '276'=>'Germany',
                    '288'=>'Ghana',
                    '292'=>'Gibraltar',
                    '300'=>'Greece',
                    '304'=>'Greenland',
                    '308'=>'Grenada',
                    '312'=>'Guadeloupe',
                    '316'=>'Guam',
                    '320'=>'Guatemala',
                    '324'=>'Guinea',
                    '624'=>'Guinea-Bissau',
                    '328'=>'Guyana',
                    '332'=>'Haiti',
                    '334'=>'Heard and Mcdonald Islands',
                    '340'=>'Honduras',
                    '344'=>'Hong Kong',
                    '348'=>'Hungary',
                    '352'=>'Iceland',
                    '356'=>'India',
                    '360'=>'Indonesia',
                    '364'=>'Iran (Islamic republic of)',
                    '368'=>'Iraq',
                    '372'=>'Ireland',
                    '376'=>'Israel',
                    '380'=>'Italy',
                    '388'=>'Jamaica',
                    '392'=>'Japan',
                    '400'=>'Jordan',
                    '398'=>'Kazakhstan',
                    '404'=>'Kenya',
                    '296'=>'Kiribati',
                    '408'=>'Korea, Democratic Peoples Republic of',
                    '410'=>'Korea,Republic of',
                    '414'=>'Kuwait',
                    '417'=>'Kyrgyzstan',
                    '418'=>'lao peoples democratic republic',
                    '428'=>'Latvia',
                    '422'=>'Lebanon',
                    '426'=>'Lesotho',
                    '430'=>'Liberia',
                    '434'=>'Libyan Arab Jamahiriya',
                    '438'=>'Liechtenstein',
                    '440'=>'Lithuania',
                    '442'=>'Luxembourg',
                    '446'=>'Macau',
                    '807'=>'Macedonia, The Former Yugoslav Republic of',
                    '450'=>'Madagascar',
                    '454'=>'Malawi',
                    '458'=>'Malaysia',
                    '462'=>'Maldives',
                    '466'=>'Mali',
                    '470'=>'Malta',
                    '584'=>'Marshall Islands',
                    '474'=>'Martinique',
                    '478'=>'Mauritania',
                    '480'=>'Mauritius',
                    '175'=>'Mayotte',
                    '484'=>'Mexico',
                    '583'=>'Micronesia,Federated states of',
                    '498'=>'Moldova,Republic of',
                    '492'=>'Monaco',
                    '496'=>'Mongolia',
                    '500'=>'Montserrat',
                    '504'=>'Morocco',
                    '508'=>'Mozambique',
                    '104'=>'Myanmar',
                    '516'=>'Namibia',
                    '520'=>'Nauru',
                    '524'=>'Nepal',
                    '528'=>'Netherlands',
                    '530'=>'Netherlands Antilles',
                    '540'=>'New Caledonia',
                    '554'=>'New Zealand',
                    '558'=>'Nicaragua',
                    '562'=>'Niger',
                    '566'=>'Nigeria',
                    '570'=>'Niue',
                    '574'=>'Norfolk Island',
                    '580'=>'Northern Mariana Islands',
                    '578'=>'Norway',
                    '512'=>'Oman',
                    '586'=>'Pakistan',
                    '585'=>'Palau',
                    '275'=>'Palestinian Territory,Occupied',
                    '591'=>'Panama',
                    '598'=>'Papua New Guinea',
                    '600'=>'Paraguay',
                    '604'=>'Peru',
                    '608'=>'Philippines',
                    '612'=>'Pitcairn',
                    '616'=>'Poland',
                    '620'=>'Portugal',
                    '630'=>'Puertorico',
                    '634'=>'Qatar',
                    '638'=>'Reunion',
                    '642'=>'Romania',
                    '643'=>'Russian Federation',
                    '646'=>'Rwanda',
                    '654'=>'Saint Helena',
                    '659'=>'Saint Kitts and Nevis',
                    '662'=>'Saint Lucia',
                    '666'=>'Saint Pierre and Miquelon',
                    '670'=>'Saint Vincent and the Grenadines',
                    '882'=>'Samoa',
                    '674'=>'San Marino',
                    '678'=>'Sao Tome And Principe',
                    '682'=>'Saudi Arabia',
                    '686'=>'Senegal',
                    '891'=>'Serbia and Montenegro',
                    '690'=>'Seychelles',
                    '694'=>'Sierra Leone',
                    '702'=>'Singapore',
                    '703'=>'Slovakia',
                    '705'=>'Slovenia',
                    '090'=>'Solomon Islands',
                    '706'=>'Somalia',
                    '710'=>'South africa',
                    '239'=>'South Georgia And The South Sandwich Islands',
                    '724'=>'Spain',
                    '144'=>'Srilanka',
                    '736'=>'Sudan',
                    '740'=>'Suriname',
                    '744'=>'Svalbard And Jan Mayen Islands',
                    '748'=>'Swaziland',
                    '752'=>'Sweden',
                    '756'=>'Switzerland',
                    '760'=>'Syrian Arab Republic',
                    '158'=>'Taiwan',
                    '762'=>'Tajikistan',
                    '834'=>'Tanzania,United Republic of',
                    '764'=>'Thailand',
                    '626'=>'Timor-Leste',
                    '768'=>'Togo',
                    '772'=>'Tokelau',
                    '776'=>'Tonga',
                    '780'=>'Trinidad and Tobago',
                    '788'=>'Tunisia',
                    '792'=>'Turkey',
                    '795'=>'Turkmenistan',
                    '796'=>'Turks And Caicos Islands',
                    '798'=>'Tuvalu',
                    '800'=>'Uganda',
                    '804'=>'Ukraine',
                    '784'=>'United Arab Emirates',
                    '826'=>'United Kingdom',
                    '840'=>'United States',
                    '581'=>'United States Minor Outlying Islands',
                    '858'=>'Uruguay',
                    '860'=>'Uzbekistan',
                    '548'=>'Vanuatu',
                    '336'=>'Vatican City State (Holy See)',
                    '862'=>'Venezuela',
                    '704'=>'Vietnam',
                    '092'=>'Virgin Islands (British)',
                    '850'=>'Virgin Islands (U.S.)',
                    '876'=>'Wallis And Futuna Islands',
                    '732'=>'Western Sahara',
                    '887'=>'Yemen',
                    '894'=>'Zambia',
                    '716'=>'Zimbabwe',
				)
			)
		);