The most time consuming part of creating a country drop down is the data. Here you can find the data for all countries—including their codes (ISO 3166-1 alpha-2)—in a PHP array. That way you can output it however you like.
The array is associative and has the two digit country code as the index and the country name as the element value.
Country codes are useful as some eCommerce payment gateways require these rather than the full country name. Here’s the array: Read more »




