Home > finance, html, php > Currency names and codes [PHP]

Currency names and codes [PHP]

Problem

You want a combo box in your HTML page with all the currency names and codes.

Solution

The standard ISO codes can be found here. For collecting my list, I used this page. This latter page also provides the data in CSV format. I took this CSV data and transformed into PHP code:

 "UAE Dirham",
"AFN" => "Afghanistan Afghani",
"ALL" => "Albanian Lek",
"AMD" => "Armenian Dram",
"ANG" => "Netherlands Antillian Guilder",
"AOA" => "Angolan Kwanza",
"ARS" => "Argentine Peso",
"AUD" => "Australian Dollar",
"AWG" => "Aruban Guilder",
"AZM" => "Azerbaijanian Manat",
"BAM" => "Bosnia and Herzegovina Convertible Marks",
"BBD" => "Barbados Dollar",
"BDT" => "Bangladesh Taka",
"BGN" => "Bulgarian Lev",
"BHD" => "Bahraini Dinar",
"BIF" => "Burundi Franc",
"BMD" => "Bermudian Dollar",
"BND" => "Brunei Dollar",
"BOB" => "Bolivian Boliviano",
"BRL" => "Brazilian Real",
"BSD" => "Bahamian Dollar",
"BTN" => "Bhutan Ngultrum",
"BWP" => "Botswana Pula",
"BYR" => "Belarussian Ruble",
"BZD" => "Belize Dollar",
"CAD" => "Canadian Dollar",
"CDF" => "Franc Congolais",
"CHF" => "Swiss Franc",
"CLP" => "Chilean Peso",
"CNY" => "Chinese Yuan Renminbi",
"COP" => "Colombian Peso",
"CRC" => "Costa Rican Colon",
"CSD" => "Serbian Dinar",
"CUP" => "Cuban Peso",
"CVE" => "Cape Verde Escudo",
"CYP" => "Cyprus Pound",
"CZK" => "Czech Koruna",
"DJF" => "Djibouti Franc",
"DKK" => "Danish Krone",
"DOP" => "Dominican Peso",
"DZD" => "Algerian Dinar",
"EEK" => "Estonian Kroon",
"EGP" => "Egyptian Pound",
"ERN" => "Eritrea Nafka",
"ETB" => "Ethiopian Birr",
"EUR" => "euro",
"FJD" => "Fiji Dollar",
"FKP" => "Falkland Islands Pound",
"GBP" => "Pound Sterling",
"GEL" => "Georgian Lari",
"GHC" => "Ghana Cedi",
"GIP" => "Gibraltar Pound",
"GMD" => "Gambian Dalasi",
"GNF" => "Guinea Franc",
"GTQ" => "Guatemala Quetzal",
"GYD" => "Guyana Dollar",
"HKD" => "Hong Kong Dollar",
"HNL" => "Honduras Lempira",
"HRK" => "Croatian Kuna",
"HTG" => "Haiti Gourde",
"HUF" => "Hungarian Forint",
"IDR" => "Indonesian Rupiah",
"ILS" => "New Israeli Shekel",
"INR" => "Indian Rupee",
"IQD" => "Iraqi Dinar",
"IRR" => "Iranian Rial",
"ISK" => "Iceland Krona",
"JMD" => "Jamaican Dollar",
"JOD" => "Jordanian Dinar",
"JPY" => "Japanese Yen",
"KES" => "Kenyan Shilling",
"KGS" => "Kyrgyzstan Som",
"KHR" => "Cambodia Riel",
"KMF" => "Comoro Franc",
"KPW" => "North Korean Won",
"KRW" => "Korean Won",
"KWD" => "Kuwaiti Dinar",
"KYD" => "Cayman Islands Dollar",
"KZT" => "Kazakhstan Tenge",
"LAK" => "Lao Kip",
"LBP" => "Lebanese Pound",
"LKR" => "Sri Lanka Rupee",
"LRD" => "Liberian Dollar",
"LSL" => "Lesotho Loti",
"LTL" => "Lithuanian Litas",
"LVL" => "Latvian Lats",
"LYD" => "Libyan Dinar",
"MAD" => "Moroccan Dirham",
"MDL" => "Moldovan Leu",
"MGA" => "Malagasy Ariary",
"MKD" => "Macedonian Denar",
"MMK" => "Myanmar Kyat",
"MNT" => "Mongolian Tugrik",
"MOP" => "Macau Pataca",
"MRO" => "Mauritania Ouguiya",
"MTL" => "Maltese Lira",
"MUR" => "Mauritius Rupee",
"MVR" => "Maldives Rufiyaa",
"MWK" => "Malawi Kwacha",
"MXN" => "Mexican Peso",
"MYR" => "Malaysian Ringgit",
"MZM" => "Mozambique Metical",
"NAD" => "Namibia Dollar",
"NGN" => "Nigerian Naira",
"NIO" => "Nicaragua Cordoba Oro",
"NOK" => "Norwegian Krone",
"NPR" => "Nepalese Rupee",
"NZD" => "New Zealand Dollar",
"OMR" => "Rial Omani",
"PAB" => "Panama Balboa",
"PEN" => "Peruvian Nuevo Sol",
"PGK" => "Papua New Guinea Kina",
"PHP" => "Philippine Peso",
"PKR" => "Pakistan Rupee",
"PLN" => "Polish Zloty",
"PYG" => "Paraguayan Guarani",
"QAR" => "Qatari Rial",
"RON" => "Romanian Leu",
"RUB" => "Russian Ruble",
"RWF" => "Rwanda Franc",
"SAR" => "Saudi Riyal",
"SBD" => "Solomon Islands Dollar",
"SCR" => "Seychelles Rupee",
"SDD" => "Sudanese Dinar",
"SEK" => "Swedish Krona",
"SGD" => "Singapore Dollar",
"SHP" => "St Helena Pound",
"SIT" => "Slovenian Tolar",
"SKK" => "Slovak Koruna",
"SLL" => "Sierra Leone Leone",
"SOS" => "Somali Shilling",
"SRD" => "Surinam Dollar",
"STD" => "São Tome and Principe Dobra",
"SVC" => "El Salvador Colon",
"SYP" => "Syrian Pound",
"SZL" => "Swaziland Lilangeni",
"THB" => "Thai Baht",
"TJS" => "Tajik Somoni",
"TMM" => "Turkmenistan Manat",
"TND" => "Tunisian Dinar",
"TOP" => "Tonga Pa'anga",
"TRY" => "Turkish Lira",
"TTD" => "Trinidad and Tobago Dollar",
"TWD" => "New Taiwan Dollar",
"TZS" => "Tanzanian Shilling",
"UAH" => "Ukraine Hryvnia",
"UGX" => "Uganda Shilling",
"USD" => "US Dollar",
"UYU" => "Peso Uruguayo",
"UZS" => "Uzbekistan Sum",
"VEB" => "Venezuelan Bolivar",
"VND" => "Vietnamese Dong",
"VUV" => "Vanuatu Vatu",
"WST" => "Samoa Tala",
"XAF" => "CFA Franc BEAC",
"XCD" => "East Caribbean Dollar",
"XDR" => "SDR (Special Drawing Rights)",
"XOF" => "CFA Franc BCEAO",
"XPF" => "CFP Franc",
"YER" => "Yemeni Rial",
"ZAR" => "South African Rand",
"ZMK" => "Zambian Kwacha",
"ZWD" => "Zimbabwe Dollar",
);
?>

Links

The page http://www.jhall.demon.co.uk/currency/by_country.html contains some additional information. It’s very useful to find out the local currency of a given country.

Example:


Country; Co. Code; Currency; Curr. Code
Hungary; HU;       Forint;   HUF

Advertisements
Categories: finance, html, php Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: