Country list with country code and continent


/ Published in: PHP
Save to your folder(s)

Here's a country list with continent and country by country code!


Copy this code and paste it in your HTML
  1. $countries = array(
  2. "AF" => array("country" => "Afghanistan", "continent" => "Asia"),
  3. "AX" => array("country" => "Ã…land Islands", "continent" => "Europe"),
  4. "AL" => array("country" => "Albania", "continent" => "Europe"),
  5. "DZ" => array("country" => "Algeria", "continent" => "Africa"),
  6. "AS" => array("country" => "American Samoa", "continent" => "Oceania"),
  7. "AD" => array("country" => "Andorra", "continent" => "Europe"),
  8. "AO" => array("country" => "Angola", "continent" => "Africa"),
  9. "AI" => array("country" => "Anguilla", "continent" => "North America"),
  10. "AQ" => array("country" => "Antarctica", "continent" => "Antarctica"),
  11. "AG" => array("country" => "Antigua and Barbuda", "continent" => "North America"),
  12. "AR" => array("country" => "Argentina", "continent" => "South America"),
  13. "AM" => array("country" => "Armenia", "continent" => "Asia"),
  14. "AW" => array("country" => "Aruba", "continent" => "North America"),
  15. "AU" => array("country" => "Australia", "continent" => "Oceania"),
  16. "AT" => array("country" => "Austria", "continent" => "Europe"),
  17. "AZ" => array("country" => "Azerbaijan", "continent" => "Asia"),
  18. "BS" => array("country" => "Bahamas", "continent" => "North America"),
  19. "BH" => array("country" => "Bahrain", "continent" => "Asia"),
  20. "BD" => array("country" => "Bangladesh", "continent" => "Asia"),
  21. "BB" => array("country" => "Barbados", "continent" => "North America"),
  22. "BY" => array("country" => "Belarus", "continent" => "Europe"),
  23. "BE" => array("country" => "Belgium", "continent" => "Europe"),
  24. "BZ" => array("country" => "Belize", "continent" => "North America"),
  25. "BJ" => array("country" => "Benin", "continent" => "Africa"),
  26. "BM" => array("country" => "Bermuda", "continent" => "North America"),
  27. "BT" => array("country" => "Bhutan", "continent" => "Asia"),
  28. "BO" => array("country" => "Bolivia", "continent" => "South America"),
  29. "BA" => array("country" => "Bosnia and Herzegovina", "continent" => "Europe"),
  30. "BW" => array("country" => "Botswana", "continent" => "Africa"),
  31. "BV" => array("country" => "Bouvet Island", "continent" => "Antarctica"),
  32. "BR" => array("country" => "Brazil", "continent" => "South America"),
  33. "IO" => array("country" => "British Indian Ocean Territory", "continent" => "Asia"),
  34. "BN" => array("country" => "Brunei Darussalam", "continent" => "Asia"),
  35. "BG" => array("country" => "Bulgaria", "continent" => "Europe"),
  36. "BF" => array("country" => "Burkina Faso", "continent" => "Africa"),
  37. "BI" => array("country" => "Burundi", "continent" => "Africa"),
  38. "KH" => array("country" => "Cambodia", "continent" => "Asia"),
  39. "CM" => array("country" => "Cameroon", "continent" => "Africa"),
  40. "CA" => array("country" => "Canada", "continent" => "North America"),
  41. "CV" => array("country" => "Cape Verde", "continent" => "Africa"),
  42. "KY" => array("country" => "Cayman Islands", "continent" => "North America"),
  43. "CF" => array("country" => "Central African Republic", "continent" => "Africa"),
  44. "TD" => array("country" => "Chad", "continent" => "Africa"),
  45. "CL" => array("country" => "Chile", "continent" => "South America"),
  46. "CN" => array("country" => "China", "continent" => "Asia"),
  47. "CX" => array("country" => "Christmas Island", "continent" => "Asia"),
  48. "CC" => array("country" => "Cocos (Keeling) Islands", "continent" => "Asia"),
  49. "CO" => array("country" => "Colombia", "continent" => "South America"),
  50. "KM" => array("country" => "Comoros", "continent" => "Africa"),
  51. "CG" => array("country" => "Congo", "continent" => "Africa"),
  52. "CD" => array("country" => "The Democratic Republic of The Congo", "continent" => "Africa"),
  53. "CK" => array("country" => "Cook Islands", "continent" => "Oceania"),
  54. "CR" => array("country" => "Costa Rica", "continent" => "North America"),
  55. "CI" => array("country" => "Cote D'ivoire", "continent" => "Africa"),
  56. "HR" => array("country" => "Croatia", "continent" => "Europe"),
  57. "CU" => array("country" => "Cuba", "continent" => "North America"),
  58. "CY" => array("country" => "Cyprus", "continent" => "Asia"),
  59. "CZ" => array("country" => "Czech Republic", "continent" => "Europe"),
  60. "DK" => array("country" => "Denmark", "continent" => "Europe"),
  61. "DJ" => array("country" => "Djibouti", "continent" => "Africa"),
  62. "DM" => array("country" => "Dominica", "continent" => "North America"),
  63. "DO" => array("country" => "Dominican Republic", "continent" => "North America"),
  64. "EC" => array("country" => "Ecuador", "continent" => "South America"),
  65. "EG" => array("country" => "Egypt", "continent" => "Africa"),
  66. "SV" => array("country" => "El Salvador", "continent" => "North America"),
  67. "GQ" => array("country" => "Equatorial Guinea", "continent" => "Africa"),
  68. "ER" => array("country" => "Eritrea", "continent" => "Africa"),
  69. "EE" => array("country" => "Estonia", "continent" => "Europe"),
  70. "ET" => array("country" => "Ethiopia", "continent" => "Africa"),
  71. "FK" => array("country" => "Falkland Islands (Malvinas)", "continent" => "South America"),
  72. "FO" => array("country" => "Faroe Islands", "continent" => "Europe"),
  73. "FJ" => array("country" => "Fiji", "continent" => "Oceania"),
  74. "FI" => array("country" => "Finland", "continent" => "Europe"),
  75. "FR" => array("country" => "France", "continent" => "Europe"),
  76. "GF" => array("country" => "French Guiana", "continent" => "South America"),
  77. "PF" => array("country" => "French Polynesia", "continent" => "Oceania"),
  78. "TF" => array("country" => "French Southern Territories", "continent" => "Antarctica"),
  79. "GA" => array("country" => "Gabon", "continent" => "Africa"),
  80. "GM" => array("country" => "Gambia", "continent" => "Africa"),
  81. "GE" => array("country" => "Georgia", "continent" => "Asia"),
  82. "DE" => array("country" => "Germany", "continent" => "Europe"),
  83. "GH" => array("country" => "Ghana", "continent" => "Africa"),
  84. "GI" => array("country" => "Gibraltar", "continent" => "Europe"),
  85. "GR" => array("country" => "Greece", "continent" => "Europe"),
  86. "GL" => array("country" => "Greenland", "continent" => "North America"),
  87. "GD" => array("country" => "Grenada", "continent" => "North America"),
  88. "GP" => array("country" => "Guadeloupe", "continent" => "North America"),
  89. "GU" => array("country" => "Guam", "continent" => "Oceania"),
  90. "GT" => array("country" => "Guatemala", "continent" => "North America"),
  91. "GG" => array("country" => "Guernsey", "continent" => "Europe"),
  92. "GN" => array("country" => "Guinea", "continent" => "Africa"),
  93. "GW" => array("country" => "Guinea-bissau", "continent" => "Africa"),
  94. "GY" => array("country" => "Guyana", "continent" => "South America"),
  95. "HT" => array("country" => "Haiti", "continent" => "North America"),
  96. "HM" => array("country" => "Heard Island and Mcdonald Islands", "continent" => "Antarctica"),
  97. "VA" => array("country" => "Holy See (Vatican City State)", "continent" => "Europe"),
  98. "HN" => array("country" => "Honduras", "continent" => "North America"),
  99. "HK" => array("country" => "Hong Kong", "continent" => "Asia"),
  100. "HU" => array("country" => "Hungary", "continent" => "Europe"),
  101. "IS" => array("country" => "Iceland", "continent" => "Europe"),
  102. "IN" => array("country" => "India", "continent" => "Asia"),
  103. "ID" => array("country" => "Indonesia", "continent" => "Asia"),
  104. "IR" => array("country" => "Iran", "continent" => "Asia"),
  105. "IQ" => array("country" => "Iraq", "continent" => "Asia"),
  106. "IE" => array("country" => "Ireland", "continent" => "Europe"),
  107. "IM" => array("country" => "Isle of Man", "continent" => "Europe"),
  108. "IL" => array("country" => "Israel", "continent" => "Asia"),
  109. "IT" => array("country" => "Italy", "continent" => "Europe"),
  110. "JM" => array("country" => "Jamaica", "continent" => "North America"),
  111. "JP" => array("country" => "Japan", "continent" => "Asia"),
  112. "JE" => array("country" => "Jersey", "continent" => "Europe"),
  113. "JO" => array("country" => "Jordan", "continent" => "Asia"),
  114. "KZ" => array("country" => "Kazakhstan", "continent" => "Asia"),
  115. "KE" => array("country" => "Kenya", "continent" => "Africa"),
  116. "KI" => array("country" => "Kiribati", "continent" => "Oceania"),
  117. "KP" => array("country" => "Democratic People's Republic of Korea", "continent" => "Asia"),
  118. "KR" => array("country" => "Republic of Korea", "continent" => "Asia"),
  119. "KW" => array("country" => "Kuwait", "continent" => "Asia"),
  120. "KG" => array("country" => "Kyrgyzstan", "continent" => "Asia"),
  121. "LA" => array("country" => "Lao People's Democratic Republic", "continent" => "Asia"),
  122. "LV" => array("country" => "Latvia", "continent" => "Europe"),
  123. "LB" => array("country" => "Lebanon", "continent" => "Asia"),
  124. "LS" => array("country" => "Lesotho", "continent" => "Africa"),
  125. "LR" => array("country" => "Liberia", "continent" => "Africa"),
  126. "LY" => array("country" => "Libya", "continent" => "Africa"),
  127. "LI" => array("country" => "Liechtenstein", "continent" => "Europe"),
  128. "LT" => array("country" => "Lithuania", "continent" => "Europe"),
  129. "LU" => array("country" => "Luxembourg", "continent" => "Europe"),
  130. "MO" => array("country" => "Macao", "continent" => "Asia"),
  131. "MK" => array("country" => "Macedonia", "continent" => "Europe"),
  132. "MG" => array("country" => "Madagascar", "continent" => "Africa"),
  133. "MW" => array("country" => "Malawi", "continent" => "Africa"),
  134. "MY" => array("country" => "Malaysia", "continent" => "Asia"),
  135. "MV" => array("country" => "Maldives", "continent" => "Asia"),
  136. "ML" => array("country" => "Mali", "continent" => "Africa"),
  137. "MT" => array("country" => "Malta", "continent" => "Europe"),
  138. "MH" => array("country" => "Marshall Islands", "continent" => "Oceania"),
  139. "MQ" => array("country" => "Martinique", "continent" => "North America"),
  140. "MR" => array("country" => "Mauritania", "continent" => "Africa"),
  141. "MU" => array("country" => "Mauritius", "continent" => "Africa"),
  142. "YT" => array("country" => "Mayotte", "continent" => "Africa"),
  143. "MX" => array("country" => "Mexico", "continent" => "North America"),
  144. "FM" => array("country" => "Micronesia", "continent" => "Oceania"),
  145. "MD" => array("country" => "Moldova", "continent" => "Europe"),
  146. "MC" => array("country" => "Monaco", "continent" => "Europe"),
  147. "MN" => array("country" => "Mongolia", "continent" => "Asia"),
  148. "ME" => array("country" => "Montenegro", "continent" => "Europe"),
  149. "MS" => array("country" => "Montserrat", "continent" => "North America"),
  150. "MA" => array("country" => "Morocco", "continent" => "Africa"),
  151. "MZ" => array("country" => "Mozambique", "continent" => "Africa"),
  152. "MM" => array("country" => "Myanmar", "continent" => "Asia"),
  153. "NA" => array("country" => "Namibia", "continent" => "Africa"),
  154. "NR" => array("country" => "Nauru", "continent" => "Oceania"),
  155. "NP" => array("country" => "Nepal", "continent" => "Asia"),
  156. "NL" => array("country" => "Netherlands", "continent" => "Europe"),
  157. "AN" => array("country" => "Netherlands Antilles", "continent" => "North America"),
  158. "NC" => array("country" => "New Caledonia", "continent" => "Oceania"),
  159. "NZ" => array("country" => "New Zealand", "continent" => "Oceania"),
  160. "NI" => array("country" => "Nicaragua", "continent" => "North America"),
  161. "NE" => array("country" => "Niger", "continent" => "Africa"),
  162. "NG" => array("country" => "Nigeria", "continent" => "Africa"),
  163. "NU" => array("country" => "Niue", "continent" => "Oceania"),
  164. "NF" => array("country" => "Norfolk Island", "continent" => "Oceania"),
  165. "MP" => array("country" => "Northern Mariana Islands", "continent" => "Oceania"),
  166. "NO" => array("country" => "Norway", "continent" => "Europe"),
  167. "OM" => array("country" => "Oman", "continent" => "Asia"),
  168. "PK" => array("country" => "Pakistan", "continent" => "Asia"),
  169. "PW" => array("country" => "Palau", "continent" => "Oceania"),
  170. "PS" => array("country" => "Palestinia", "continent" => "Asia"),
  171. "PA" => array("country" => "Panama", "continent" => "North America"),
  172. "PG" => array("country" => "Papua New Guinea", "continent" => "Oceania"),
  173. "PY" => array("country" => "Paraguay", "continent" => "South America"),
  174. "PE" => array("country" => "Peru", "continent" => "South America"),
  175. "PH" => array("country" => "Philippines", "continent" => "Asia"),
  176. "PN" => array("country" => "Pitcairn", "continent" => "Oceania"),
  177. "PL" => array("country" => "Poland", "continent" => "Europe"),
  178. "PT" => array("country" => "Portugal", "continent" => "Europe"),
  179. "PR" => array("country" => "Puerto Rico", "continent" => "North America"),
  180. "QA" => array("country" => "Qatar", "continent" => "Asia"),
  181. "RE" => array("country" => "Reunion", "continent" => "Africa"),
  182. "RO" => array("country" => "Romania", "continent" => "Europe"),
  183. "RU" => array("country" => "Russian Federation", "continent" => "Europe"),
  184. "RW" => array("country" => "Rwanda", "continent" => "Africa"),
  185. "SH" => array("country" => "Saint Helena", "continent" => "Africa"),
  186. "KN" => array("country" => "Saint Kitts and Nevis", "continent" => "North America"),
  187. "LC" => array("country" => "Saint Lucia", "continent" => "North America"),
  188. "PM" => array("country" => "Saint Pierre and Miquelon", "continent" => "North America"),
  189. "VC" => array("country" => "Saint Vincent and The Grenadines", "continent" => "North America"),
  190. "WS" => array("country" => "Samoa", "continent" => "Oceania"),
  191. "SM" => array("country" => "San Marino", "continent" => "Europe"),
  192. "ST" => array("country" => "Sao Tome and Principe", "continent" => "Africa"),
  193. "SA" => array("country" => "Saudi Arabia", "continent" => "Asia"),
  194. "SN" => array("country" => "Senegal", "continent" => "Africa"),
  195. "RS" => array("country" => "Serbia", "continent" => "Europe"),
  196. "SC" => array("country" => "Seychelles", "continent" => "Africa"),
  197. "SL" => array("country" => "Sierra Leone", "continent" => "Africa"),
  198. "SG" => array("country" => "Singapore", "continent" => "Asia"),
  199. "SK" => array("country" => "Slovakia", "continent" => "Europe"),
  200. "SI" => array("country" => "Slovenia", "continent" => "Europe"),
  201. "SB" => array("country" => "Solomon Islands", "continent" => "Oceania"),
  202. "SO" => array("country" => "Somalia", "continent" => "Africa"),
  203. "ZA" => array("country" => "South Africa", "continent" => "Africa"),
  204. "GS" => array("country" => "South Georgia and The South Sandwich Islands", "continent" => "Antarctica"),
  205. "ES" => array("country" => "Spain", "continent" => "Europe"),
  206. "LK" => array("country" => "Sri Lanka", "continent" => "Asia"),
  207. "SD" => array("country" => "Sudan", "continent" => "Africa"),
  208. "SR" => array("country" => "Suriname", "continent" => "South America"),
  209. "SJ" => array("country" => "Svalbard and Jan Mayen", "continent" => "Europe"),
  210. "SZ" => array("country" => "Swaziland", "continent" => "Africa"),
  211. "SE" => array("country" => "Sweden", "continent" => "Europe"),
  212. "CH" => array("country" => "Switzerland", "continent" => "Europe"),
  213. "SY" => array("country" => "Syrian Arab Republic", "continent" => "Asia"),
  214. "TW" => array("country" => "Taiwan, Province of China", "continent" => "Asia"),
  215. "TJ" => array("country" => "Tajikistan", "continent" => "Asia"),
  216. "TZ" => array("country" => "Tanzania, United Republic of", "continent" => "Africa"),
  217. "TH" => array("country" => "Thailand", "continent" => "Asia"),
  218. "TL" => array("country" => "Timor-leste", "continent" => "Asia"),
  219. "TG" => array("country" => "Togo", "continent" => "Africa"),
  220. "TK" => array("country" => "Tokelau", "continent" => "Oceania"),
  221. "TO" => array("country" => "Tonga", "continent" => "Oceania"),
  222. "TT" => array("country" => "Trinidad and Tobago", "continent" => "North America"),
  223. "TN" => array("country" => "Tunisia", "continent" => "Africa"),
  224. "TR" => array("country" => "Turkey", "continent" => "Asia"),
  225. "TM" => array("country" => "Turkmenistan", "continent" => "Asia"),
  226. "TC" => array("country" => "Turks and Caicos Islands", "continent" => "North America"),
  227. "TV" => array("country" => "Tuvalu", "continent" => "Oceania"),
  228. "UG" => array("country" => "Uganda", "continent" => "Africa"),
  229. "UA" => array("country" => "Ukraine", "continent" => "Europe"),
  230. "AE" => array("country" => "United Arab Emirates", "continent" => "Asia"),
  231. "GB" => array("country" => "United Kingdom", "continent" => "Europe"),
  232. "US" => array("country" => "United States", "continent" => "North America"),
  233. "UM" => array("country" => "United States Minor Outlying Islands", "continent" => "Oceania"),
  234. "UY" => array("country" => "Uruguay", "continent" => "South America"),
  235. "UZ" => array("country" => "Uzbekistan", "continent" => "Asia"),
  236. "VU" => array("country" => "Vanuatu", "continent" => "Oceania"),
  237. "VE" => array("country" => "Venezuela", "continent" => "South America"),
  238. "VN" => array("country" => "Viet Nam", "continent" => "Asia"),
  239. "VG" => array("country" => "Virgin Islands, British", "continent" => "North America"),
  240. "VI" => array("country" => "Virgin Islands, U.S.", "continent" => "North America"),
  241. "WF" => array("country" => "Wallis and Futuna", "continent" => "Oceania"),
  242. "EH" => array("country" => "Western Sahara", "continent" => "Africa"),
  243. "YE" => array("country" => "Yemen", "continent" => "Asia"),
  244. "ZM" => array("country" => "Zambia", "continent" => "Africa"),
  245. "ZW" => array("country" => "Zimbabwe", "continent" => "Africa")
  246. );
  247.  
  248.  
  249. ?>
  250. <select>
  251. <option>Choose country:</option>
  252. <?php
  253. foreach($countries as $country_code => $arr){
  254. echo '<option value="'.$country_code.'">'.$arr['country'].'</option>';
  255. }
  256. ?>
  257. </select>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.