Skip to content

Instantly share code, notes, and snippets.

@manchumahara
Created October 11, 2022 09:33
Show Gist options
  • Save manchumahara/9de706ed13d7cb54fa024d4ad29caea0 to your computer and use it in GitHub Desktop.
Save manchumahara/9de706ed13d7cb54fa024d4ad29caea0 to your computer and use it in GitHub Desktop.
Country list, codes etc
function countries_code()
{
$countries = array(
array('id' => '1', 'name' => 'Afghanistan', 'iso_code' => 'AF', 'phonecode' => '+93'),
/*array('id' => '2', 'name' => 'Aland Islands', 'iso_code' => 'AX', 'phonecode' => '+358-18'),*/
array('id' => '3', 'name' => 'Albania', 'iso_code' => 'AL', 'phonecode' => '+355'),
array('id' => '4', 'name' => 'Algeria', 'iso_code' => 'DZ', 'phonecode' => '+213'),
/*array('id' => '5', 'name' => 'American Samoa', 'iso_code' => 'AS', 'phonecode' => '+1-684'),*/
array('id' => '6', 'name' => 'Andorra', 'iso_code' => 'AD', 'phonecode' => '+376'),
array('id' => '7', 'name' => 'Angola', 'iso_code' => 'AO', 'phonecode' => '+244'),
/*array('id' => '8', 'name' => 'Anguilla', 'iso_code' => 'AI', 'phonecode' => '+1-264'),*/
array('id' => '9', 'name' => 'Antarctica', 'iso_code' => 'AQ', 'phonecode' => '+672'),
/*array('id' => '10', 'name' => 'Antigua And Barbuda', 'iso_code' => 'AG', 'phonecode' => '+1-268'),*/
array('id' => '11', 'name' => 'Argentina', 'iso_code' => 'AR', 'phonecode' => '+54'),
array('id' => '12', 'name' => 'Armenia', 'iso_code' => 'AM', 'phonecode' => '+374'),
array('id' => '13', 'name' => 'Aruba', 'iso_code' => 'AW', 'phonecode' => '+297'),
array('id' => '14', 'name' => 'Australia', 'iso_code' => 'AU', 'phonecode' => '+61'),
array('id' => '15', 'name' => 'Austria', 'iso_code' => 'AT', 'phonecode' => '+43'),
array('id' => '16', 'name' => 'Azerbaijan', 'iso_code' => 'AZ', 'phonecode' => '+994'),
/*array('id' => '17', 'name' => 'Bahamas The', 'iso_code' => 'BS', 'phonecode' => '+1-242'),*/
array('id' => '18', 'name' => 'Bahrain', 'iso_code' => 'BH', 'phonecode' => '+973'),
array('id' => '19', 'name' => 'Bangladesh', 'iso_code' => 'BD', 'phonecode' => '+880'),
/*array('id' => '20', 'name' => 'Barbados', 'iso_code' => 'BB', 'phonecode' => '+1-246'),*/
array('id' => '21', 'name' => 'Belarus', 'iso_code' => 'BY', 'phonecode' => '+375'),
array('id' => '22', 'name' => 'Belgium', 'iso_code' => 'BE', 'phonecode' => '+32'),
array('id' => '23', 'name' => 'Belize', 'iso_code' => 'BZ', 'phonecode' => '+501'),
array('id' => '24', 'name' => 'Benin', 'iso_code' => 'BJ', 'phonecode' => '+229'),
/*array('id' => '25', 'name' => 'Bermuda', 'iso_code' => 'BM', 'phonecode' => '+1-441'),*/
array('id' => '26', 'name' => 'Bhutan', 'iso_code' => 'BT', 'phonecode' => '+975'),
array('id' => '27', 'name' => 'Bolivia', 'iso_code' => 'BO', 'phonecode' => '+591'),
array('id' => '28', 'name' => 'Bosnia and Herzegovina', 'iso_code' => 'BA', 'phonecode' => '+387'),
array('id' => '29', 'name' => 'Botswana', 'iso_code' => 'BW', 'phonecode' => '+267'),
/* array('id' => '30', 'name' => 'Bouvet Island', 'iso_code' => 'BV', 'phonecode' => '+0055'),*/
array('id' => '31', 'name' => 'Brazil', 'iso_code' => 'BR', 'phonecode' => '+55'),
array('id' => '32', 'name' => 'British Indian Ocean Territory', 'iso_code' => 'IO', 'phonecode' => '+246'),
array('id' => '33', 'name' => 'Brunei', 'iso_code' => 'BN', 'phonecode' => '+673'),
array('id' => '34', 'name' => 'Bulgaria', 'iso_code' => 'BG', 'phonecode' => '+359'),
array('id' => '35', 'name' => 'Burkina Faso', 'iso_code' => 'BF', 'phonecode' => '+226'),
array('id' => '36', 'name' => 'Burundi', 'iso_code' => 'BI', 'phonecode' => '+257'),
array('id' => '37', 'name' => 'Cambodia', 'iso_code' => 'KH', 'phonecode' => '+855'),
array('id' => '38', 'name' => 'Cameroon', 'iso_code' => 'CM', 'phonecode' => '+237'),
array('id' => '39', 'name' => 'Canada', 'iso_code' => 'CA', 'phonecode' => '+1'),
array('id' => '40', 'name' => 'Cape Verde', 'iso_code' => 'CV', 'phonecode' => '+238'),
/*array('id' => '41', 'name' => 'Cayman Islands', 'iso_code' => 'KY', 'phonecode' => '+1-345'),*/
array('id' => '42', 'name' => 'Central African Republic', 'iso_code' => 'CF', 'phonecode' => '+236'),
array('id' => '43', 'name' => 'Chad', 'iso_code' => 'TD', 'phonecode' => '+235'),
array('id' => '44', 'name' => 'Chile', 'iso_code' => 'CL', 'phonecode' => '+56'),
array('id' => '45', 'name' => 'China', 'iso_code' => 'CN', 'phonecode' => '+86'),
array('id' => '46', 'name' => 'Christmas Island', 'iso_code' => 'CX', 'phonecode' => '+61'),
array('id' => '47', 'name' => 'Cocos (Keeling) Islands', 'iso_code' => 'CC', 'phonecode' => '+61'),
array('id' => '48', 'name' => 'Colombia', 'iso_code' => 'CO', 'phonecode' => '+57'),
array('id' => '49', 'name' => 'Comoros', 'iso_code' => 'KM', 'phonecode' => '+269'),
array('id' => '50', 'name' => 'Congo', 'iso_code' => 'CG', 'phonecode' => '+242'),
array('id' => '51', 'name' => 'Democratic Republic of the Congo', 'iso_code' => 'CD', 'phonecode' => '+243'),
array('id' => '52', 'name' => 'Cook Islands', 'iso_code' => 'CK', 'phonecode' => '+682'),
array('id' => '53', 'name' => 'Costa Rica', 'iso_code' => 'CR', 'phonecode' => '+506'),
array('id' => '54', 'name' => 'Cote D\'Ivoire (Ivory Coast)', 'iso_code' => 'CI', 'phonecode' => '+225'),
array('id' => '55', 'name' => 'Croatia', 'iso_code' => 'HR', 'phonecode' => '+385'),
array('id' => '56', 'name' => 'Cuba', 'iso_code' => 'CU', 'phonecode' => '+53'),
array('id' => '57', 'name' => 'Cyprus', 'iso_code' => 'CY', 'phonecode' => '+357'),
array('id' => '58', 'name' => 'Czech Republic', 'iso_code' => 'CZ', 'phonecode' => '+420'),
array('id' => '59', 'name' => 'Denmark', 'iso_code' => 'DK', 'phonecode' => '+45'),
array('id' => '60', 'name' => 'Djibouti', 'iso_code' => 'DJ', 'phonecode' => '+253'),
/*array('id' => '61', 'name' => 'Dominica', 'iso_code' => 'DM', 'phonecode' => '+1-767'),*/
/*array('id' => '62', 'name' => 'Dominican Republic', 'iso_code' => 'DO', 'phonecode' => '+1-809 and 1-829'),*/
array('id' => '63', 'name' => 'East Timor', 'iso_code' => 'TL', 'phonecode' => '+670'),
array('id' => '64', 'name' => 'Ecuador', 'iso_code' => 'EC', 'phonecode' => '+593'),
array('id' => '65', 'name' => 'Egypt', 'iso_code' => 'EG', 'phonecode' => '+20'),
array('id' => '66', 'name' => 'El Salvador', 'iso_code' => 'SV', 'phonecode' => '+503'),
array('id' => '67', 'name' => 'Equatorial Guinea', 'iso_code' => 'GQ', 'phonecode' => '+240'),
array('id' => '68', 'name' => 'Eritrea', 'iso_code' => 'ER', 'phonecode' => '+291'),
array('id' => '69', 'name' => 'Estonia', 'iso_code' => 'EE', 'phonecode' => '+372'),
array('id' => '70', 'name' => 'Ethiopia', 'iso_code' => 'ET', 'phonecode' => '+251'),
array('id' => '71', 'name' => 'Falkland Islands', 'iso_code' => 'FK', 'phonecode' => '+500'),
array('id' => '72', 'name' => 'Faroe Islands', 'iso_code' => 'FO', 'phonecode' => '+298'),
array('id' => '73', 'name' => 'Fiji Islands', 'iso_code' => 'FJ', 'phonecode' => '+679'),
array('id' => '74', 'name' => 'Finland', 'iso_code' => 'FI', 'phonecode' => '+358'),
array('id' => '75', 'name' => 'France', 'iso_code' => 'FR', 'phonecode' => '+33'),
array('id' => '76', 'name' => 'French Guiana', 'iso_code' => 'GF', 'phonecode' => '+594'),
array('id' => '77', 'name' => 'French Polynesia', 'iso_code' => 'PF', 'phonecode' => '+689'),
array('id' => '78', 'name' => 'French Southern Territories', 'iso_code' => 'TF', 'phonecode' => '+262'),
array('id' => '79', 'name' => 'Gabon', 'iso_code' => 'GA', 'phonecode' => '+241'),
array('id' => '80', 'name' => 'Gambia The', 'iso_code' => 'GM', 'phonecode' => '+220'),
array('id' => '81', 'name' => 'Georgia', 'iso_code' => 'GE', 'phonecode' => '+995'),
array('id' => '82', 'name' => 'Germany', 'iso_code' => 'DE', 'phonecode' => '+49'),
array('id' => '83', 'name' => 'Ghana', 'iso_code' => 'GH', 'phonecode' => '+233'),
array('id' => '84', 'name' => 'Gibraltar', 'iso_code' => 'GI', 'phonecode' => '+350'),
array('id' => '85', 'name' => 'Greece', 'iso_code' => 'GR', 'phonecode' => '+30'),
array('id' => '86', 'name' => 'Greenland', 'iso_code' => 'GL', 'phonecode' => '+299'),
/*array('id' => '87', 'name' => 'Grenada', 'iso_code' => 'GD', 'phonecode' => '+1-473'),*/
array('id' => '88', 'name' => 'Guadeloupe', 'iso_code' => 'GP', 'phonecode' => '+590'),
/*array('id' => '89', 'name' => 'Guam', 'iso_code' => 'GU', 'phonecode' => '+1-671'),*/
array('id' => '90', 'name' => 'Guatemala', 'iso_code' => 'GT', 'phonecode' => '+502'),
/*array('id' => '91', 'name' => 'Guernsey and Alderney', 'iso_code' => 'GG', 'phonecode' => '+44-1481'),*/
array('id' => '92', 'name' => 'Guinea', 'iso_code' => 'GN', 'phonecode' => '+224'),
array('id' => '93', 'name' => 'Guinea-Bissau', 'iso_code' => 'GW', 'phonecode' => '+245'),
array('id' => '94', 'name' => 'Guyana', 'iso_code' => 'GY', 'phonecode' => '+592'),
array('id' => '95', 'name' => 'Haiti', 'iso_code' => 'HT', 'phonecode' => '+509'),
array('id' => '96', 'name' => 'Heard Island and McDonald Islands', 'iso_code' => 'HM', 'phonecode' => '+672'),
array('id' => '97', 'name' => 'Honduras', 'iso_code' => 'HN', 'phonecode' => '+504'),
array('id' => '98', 'name' => 'Hong Kong S.A.R.', 'iso_code' => 'HK', 'phonecode' => '+852'),
array('id' => '99', 'name' => 'Hungary', 'iso_code' => 'HU', 'phonecode' => '+36'),
array('id' => '100', 'name' => 'Iceland', 'iso_code' => 'IS', 'phonecode' => '+354'),
array('id' => '101', 'name' => 'India', 'iso_code' => 'IN', 'phonecode' => '+91'),
array('id' => '102', 'name' => 'Indonesia', 'iso_code' => 'ID', 'phonecode' => '+62'),
array('id' => '103', 'name' => 'Iran', 'iso_code' => 'IR', 'phonecode' => '+98'),
array('id' => '104', 'name' => 'Iraq', 'iso_code' => 'IQ', 'phonecode' => '+964'),
array('id' => '105', 'name' => 'Ireland', 'iso_code' => 'IE', 'phonecode' => '+353'),
array('id' => '106', 'name' => 'Israel', 'iso_code' => 'IL', 'phonecode' => '+972'),
array('id' => '107', 'name' => 'Italy', 'iso_code' => 'IT', 'phonecode' => '+39'),
/* array('id' => '108', 'name' => 'Jamaica', 'iso_code' => 'JM', 'phonecode' => '+1-876'),*/
array('id' => '109', 'name' => 'Japan', 'iso_code' => 'JP', 'phonecode' => '+81'),
/* array('id' => '110', 'name' => 'Jersey', 'iso_code' => 'JE', 'phonecode' => '+44-1534'),*/
array('id' => '111', 'name' => 'Jordan', 'iso_code' => 'JO', 'phonecode' => '+962'),
array('id' => '112', 'name' => 'Kazakhstan', 'iso_code' => 'KZ', 'phonecode' => '+7'),
array('id' => '113', 'name' => 'Kenya', 'iso_code' => 'KE', 'phonecode' => '+254'),
array('id' => '114', 'name' => 'Kiribati', 'iso_code' => 'KI', 'phonecode' => '+686'),
array('id' => '115', 'name' => 'North Korea', 'iso_code' => 'KP', 'phonecode' => '+850'),
array('id' => '116', 'name' => 'South Korea', 'iso_code' => 'KR', 'phonecode' => '+82'),
array('id' => '117', 'name' => 'Kuwait', 'iso_code' => 'KW', 'phonecode' => '+965'),
array('id' => '118', 'name' => 'Kyrgyzstan', 'iso_code' => 'KG', 'phonecode' => '+996'),
array('id' => '119', 'name' => 'Laos', 'iso_code' => 'LA', 'phonecode' => '+856'),
array('id' => '120', 'name' => 'Latvia', 'iso_code' => 'LV', 'phonecode' => '+371'),
array('id' => '121', 'name' => 'Lebanon', 'iso_code' => 'LB', 'phonecode' => '+961'),
array('id' => '122', 'name' => 'Lesotho', 'iso_code' => 'LS', 'phonecode' => '+266'),
array('id' => '123', 'name' => 'Liberia', 'iso_code' => 'LR', 'phonecode' => '+231'),
array('id' => '124', 'name' => 'Libya', 'iso_code' => 'LY', 'phonecode' => '+218'),
array('id' => '125', 'name' => 'Liechtenstein', 'iso_code' => 'LI', 'phonecode' => '+423'),
array('id' => '126', 'name' => 'Lithuania', 'iso_code' => 'LT', 'phonecode' => '+370'),
array('id' => '127', 'name' => 'Luxembourg', 'iso_code' => 'LU', 'phonecode' => '+352'),
array('id' => '128', 'name' => 'Macau S.A.R.', 'iso_code' => 'MO', 'phonecode' => '+853'),
array('id' => '129', 'name' => 'Macedonia', 'iso_code' => 'MK', 'phonecode' => '+389'),
array('id' => '130', 'name' => 'Madagascar', 'iso_code' => 'MG', 'phonecode' => '+261'),
array('id' => '131', 'name' => 'Malawi', 'iso_code' => 'MW', 'phonecode' => '+265'),
array('id' => '132', 'name' => 'Malaysia', 'iso_code' => 'MY', 'phonecode' => '+60'),
array('id' => '133', 'name' => 'Maldives', 'iso_code' => 'MV', 'phonecode' => '+960'),
array('id' => '134', 'name' => 'Mali', 'iso_code' => 'ML', 'phonecode' => '+223'),
array('id' => '135', 'name' => 'Malta', 'iso_code' => 'MT', 'phonecode' => '+356'),
/*array('id' => '136', 'name' => 'Man (Isle of)', 'iso_code' => 'IM', 'phonecode' => '+44-1624'),*/
array('id' => '137', 'name' => 'Marshall Islands', 'iso_code' => 'MH', 'phonecode' => '+692'),
array('id' => '138', 'name' => 'Martinique', 'iso_code' => 'MQ', 'phonecode' => '+596'),
array('id' => '139', 'name' => 'Mauritania', 'iso_code' => 'MR', 'phonecode' => '+222'),
array('id' => '140', 'name' => 'Mauritius', 'iso_code' => 'MU', 'phonecode' => '+230'),
array('id' => '141', 'name' => 'Mayotte', 'iso_code' => 'YT', 'phonecode' => '+262'),
array('id' => '142', 'name' => 'Mexico', 'iso_code' => 'MX', 'phonecode' => '+52'),
array('id' => '143', 'name' => 'Micronesia', 'iso_code' => 'FM', 'phonecode' => '+691'),
array('id' => '144', 'name' => 'Moldova', 'iso_code' => 'MD', 'phonecode' => '+373'),
array('id' => '145', 'name' => 'Monaco', 'iso_code' => 'MC', 'phonecode' => '+377'),
array('id' => '146', 'name' => 'Mongolia', 'iso_code' => 'MN', 'phonecode' => '+976'),
array('id' => '147', 'name' => 'Montenegro', 'iso_code' => 'ME', 'phonecode' => '+382'),
/*array('id' => '148', 'name' => 'Montserrat', 'iso_code' => 'MS', 'phonecode' => '+1-664'),*/
array('id' => '149', 'name' => 'Morocco', 'iso_code' => 'MA', 'phonecode' => '+212'),
array('id' => '150', 'name' => 'Mozambique', 'iso_code' => 'MZ', 'phonecode' => '+258'),
array('id' => '151', 'name' => 'Myanmar', 'iso_code' => 'MM', 'phonecode' => '+95'),
array('id' => '152', 'name' => 'Namibia', 'iso_code' => 'NA', 'phonecode' => '+264'),
array('id' => '153', 'name' => 'Nauru', 'iso_code' => 'NR', 'phonecode' => '+674'),
array('id' => '154', 'name' => 'Nepal', 'iso_code' => 'NP', 'phonecode' => '+977'),
array('id' => '155', 'name' => 'Bonaire, Sint Eustatius and Saba', 'iso_code' => 'BQ', 'phonecode' => '+599'),
array('id' => '156', 'name' => 'Netherlands', 'iso_code' => 'NL', 'phonecode' => '+31'),
array('id' => '157', 'name' => 'New Caledonia', 'iso_code' => 'NC', 'phonecode' => '+687'),
array('id' => '158', 'name' => 'New Zealand', 'iso_code' => 'NZ', 'phonecode' => '+64'),
array('id' => '159', 'name' => 'Nicaragua', 'iso_code' => 'NI', 'phonecode' => '+505'),
array('id' => '160', 'name' => 'Niger', 'iso_code' => 'NE', 'phonecode' => '+227'),
array('id' => '161', 'name' => 'Nigeria', 'iso_code' => 'NG', 'phonecode' => '+234'),
array('id' => '162', 'name' => 'Niue', 'iso_code' => 'NU', 'phonecode' => '+683'),
array('id' => '163', 'name' => 'Norfolk Island', 'iso_code' => 'NF', 'phonecode' => '+672'),
/*array('id' => '164', 'name' => 'Northern Mariana Islands', 'iso_code' => 'MP', 'phonecode' => '+1-670'),*/
array('id' => '165', 'name' => 'Norway', 'iso_code' => 'NO', 'phonecode' => '+47'),
array('id' => '166', 'name' => 'Oman', 'iso_code' => 'OM', 'phonecode' => '+968'),
array('id' => '167', 'name' => 'Pakistan', 'iso_code' => 'PK', 'phonecode' => '+92'),
array('id' => '168', 'name' => 'Palau', 'iso_code' => 'PW', 'phonecode' => '+680'),
array('id' => '169', 'name' => 'Palestinian Territory Occupied', 'iso_code' => 'PS', 'phonecode' => '+970'),
array('id' => '170', 'name' => 'Panama', 'iso_code' => 'PA', 'phonecode' => '+507'),
array('id' => '171', 'name' => 'Papua new Guinea', 'iso_code' => 'PG', 'phonecode' => '+675'),
array('id' => '172', 'name' => 'Paraguay', 'iso_code' => 'PY', 'phonecode' => '+595'),
array('id' => '173', 'name' => 'Peru', 'iso_code' => 'PE', 'phonecode' => '+51'),
array('id' => '174', 'name' => 'Philippines', 'iso_code' => 'PH', 'phonecode' => '+63'),
array('id' => '175', 'name' => 'Pitcairn Island', 'iso_code' => 'PN', 'phonecode' => '+870'),
array('id' => '176', 'name' => 'Poland', 'iso_code' => 'PL', 'phonecode' => '+48'),
array('id' => '177', 'name' => 'Portugal', 'iso_code' => 'PT', 'phonecode' => '+351'),
/*array('id' => '178', 'name' => 'Puerto Rico', 'iso_code' => 'PR', 'phonecode' => '+1-787 and 1-939'),*/
array('id' => '179', 'name' => 'Qatar', 'iso_code' => 'QA', 'phonecode' => '+974'),
array('id' => '180', 'name' => 'Reunion', 'iso_code' => 'RE', 'phonecode' => '+262'),
array('id' => '181', 'name' => 'Romania', 'iso_code' => 'RO', 'phonecode' => '+40'),
array('id' => '182', 'name' => 'Russia', 'iso_code' => 'RU', 'phonecode' => '+7'),
array('id' => '183', 'name' => 'Rwanda', 'iso_code' => 'RW', 'phonecode' => '+250'),
array('id' => '184', 'name' => 'Saint Helena', 'iso_code' => 'SH', 'phonecode' => '+290'),
/*array('id' => '185', 'name' => 'Saint Kitts And Nevis', 'iso_code' => 'KN', 'phonecode' => '+1-869'),*/
/*array('id' => '186', 'name' => 'Saint Lucia', 'iso_code' => 'LC', 'phonecode' => '+1-758'),*/
array('id' => '187', 'name' => 'Saint Pierre and Miquelon', 'iso_code' => 'PM', 'phonecode' => '+508'),
/*array('id' => '188', 'name' => 'Saint Vincent And The Grenadines', 'iso_code' => 'VC', 'phonecode' => '+1-784'),*/
array('id' => '189', 'name' => 'Saint-Barthelemy', 'iso_code' => 'BL', 'phonecode' => '+590'),
array('id' => '190', 'name' => 'Saint-Martin (French part)', 'iso_code' => 'MF', 'phonecode' => '+590'),
array('id' => '191', 'name' => 'Samoa', 'iso_code' => 'WS', 'phonecode' => '+685'),
array('id' => '192', 'name' => 'San Marino', 'iso_code' => 'SM', 'phonecode' => '+378'),
array('id' => '193', 'name' => 'Sao Tome and Principe', 'iso_code' => 'ST', 'phonecode' => '+239'),
array('id' => '194', 'name' => 'Saudi Arabia', 'iso_code' => 'SA', 'phonecode' => '+966'),
array('id' => '195', 'name' => 'Senegal', 'iso_code' => 'SN', 'phonecode' => '+221'),
array('id' => '196', 'name' => 'Serbia', 'iso_code' => 'RS', 'phonecode' => '+381'),
array('id' => '197', 'name' => 'Seychelles', 'iso_code' => 'SC', 'phonecode' => '+248'),
array('id' => '198', 'name' => 'Sierra Leone', 'iso_code' => 'SL', 'phonecode' => '+232'),
array('id' => '199', 'name' => 'Singapore', 'iso_code' => 'SG', 'phonecode' => '+65'),
array('id' => '200', 'name' => 'Slovakia', 'iso_code' => 'SK', 'phonecode' => '+421'),
array('id' => '201', 'name' => 'Slovenia', 'iso_code' => 'SI', 'phonecode' => '+386'),
array('id' => '202', 'name' => 'Solomon Islands', 'iso_code' => 'SB', 'phonecode' => '+677'),
array('id' => '203', 'name' => 'Somalia', 'iso_code' => 'SO', 'phonecode' => '+252'),
array('id' => '204', 'name' => 'South Africa', 'iso_code' => 'ZA', 'phonecode' => '+27'),
array('id' => '205', 'name' => 'South Georgia', 'iso_code' => 'GS', 'phonecode' => '+500'),
array('id' => '206', 'name' => 'South Sudan', 'iso_code' => 'SS', 'phonecode' => '+211'),
array('id' => '207', 'name' => 'Spain', 'iso_code' => 'ES', 'phonecode' => '+34'),
array('id' => '208', 'name' => 'Sri Lanka', 'iso_code' => 'LK', 'phonecode' => '+94'),
array('id' => '209', 'name' => 'Sudan', 'iso_code' => 'SD', 'phonecode' => '+249'),
array('id' => '210', 'name' => 'Suriname', 'iso_code' => 'SR', 'phonecode' => '+597'),
array('id' => '211', 'name' => 'Svalbard And Jan Mayen Islands', 'iso_code' => 'SJ', 'phonecode' => '+47'),
array('id' => '212', 'name' => 'Swaziland', 'iso_code' => 'SZ', 'phonecode' => '+268'),
array('id' => '213', 'name' => 'Sweden', 'iso_code' => 'SE', 'phonecode' => '+46'),
array('id' => '214', 'name' => 'Switzerland', 'iso_code' => 'CH', 'phonecode' => '+41'),
array('id' => '215', 'name' => 'Syria', 'iso_code' => 'SY', 'phonecode' => '+963'),
array('id' => '216', 'name' => 'Taiwan', 'iso_code' => 'TW', 'phonecode' => '+886'),
array('id' => '217', 'name' => 'Tajikistan', 'iso_code' => 'TJ', 'phonecode' => '+992'),
array('id' => '218', 'name' => 'Tanzania', 'iso_code' => 'TZ', 'phonecode' => '+255'),
array('id' => '219', 'name' => 'Thailand', 'iso_code' => 'TH', 'phonecode' => '+66'),
array('id' => '220', 'name' => 'Togo', 'iso_code' => 'TG', 'phonecode' => '+228'),
array('id' => '221', 'name' => 'Tokelau', 'iso_code' => 'TK', 'phonecode' => '+690'),
array('id' => '222', 'name' => 'Tonga', 'iso_code' => 'TO', 'phonecode' => '+676'),
/*array('id' => '223', 'name' => 'Trinidad And Tobago', 'iso_code' => 'TT', 'phonecode' => '+1-868'),*/
array('id' => '224', 'name' => 'Tunisia', 'iso_code' => 'TN', 'phonecode' => '+216'),
array('id' => '225', 'name' => 'Turkey', 'iso_code' => 'TR', 'phonecode' => '+90'),
array('id' => '226', 'name' => 'Turkmenistan', 'iso_code' => 'TM', 'phonecode' => '+993'),
/*array('id' => '227', 'name' => 'Turks And Caicos Islands', 'iso_code' => 'TC', 'phonecode' => '+1-649'),*/
array('id' => '228', 'name' => 'Tuvalu', 'iso_code' => 'TV', 'phonecode' => '+688'),
array('id' => '229', 'name' => 'Uganda', 'iso_code' => 'UG', 'phonecode' => '+256'),
array('id' => '230', 'name' => 'Ukraine', 'iso_code' => 'UA', 'phonecode' => '+380'),
array('id' => '231', 'name' => 'United Arab Emirates', 'iso_code' => 'AE', 'phonecode' => '+971'),
array('id' => '232', 'name' => 'United Kingdom', 'iso_code' => 'GB', 'phonecode' => '+44'),
array('id' => '233', 'name' => 'United States', 'iso_code' => 'US', 'phonecode' => '+1'),
array('id' => '234', 'name' => 'United States Minor Outlying Islands', 'iso_code' => 'UM', 'phonecode' => '+1'),
array('id' => '235', 'name' => 'Uruguay', 'iso_code' => 'UY', 'phonecode' => '+598'),
array('id' => '236', 'name' => 'Uzbekistan', 'iso_code' => 'UZ', 'phonecode' => '+998'),
array('id' => '237', 'name' => 'Vanuatu', 'iso_code' => 'VU', 'phonecode' => '+678'),
array('id' => '238', 'name' => 'Vatican City State (Holy See)', 'iso_code' => 'VA', 'phonecode' => '+379'),
array('id' => '239', 'name' => 'Venezuela', 'iso_code' => 'VE', 'phonecode' => '+58'),
array('id' => '240', 'name' => 'Vietnam', 'iso_code' => 'VN', 'phonecode' => '+84'),
/*array('id' => '241', 'name' => 'Virgin Islands (British)', 'iso_code' => 'VG', 'phonecode' => '+1-284'),*/
/*array('id' => '242', 'name' => 'Virgin Islands (US)', 'iso_code' => 'VI', 'phonecode' => '+1-340'),*/
array('id' => '243', 'name' => 'Wallis And Futuna Islands', 'iso_code' => 'WF', 'phonecode' => '+681'),
array('id' => '244', 'name' => 'Western Sahara', 'iso_code' => 'EH', 'phonecode' => '+212'),
array('id' => '245', 'name' => 'Yemen', 'iso_code' => 'YE', 'phonecode' => '+967'),
array('id' => '246', 'name' => 'Zambia', 'iso_code' => 'ZM', 'phonecode' => '+260'),
array('id' => '247', 'name' => 'Zimbabwe', 'iso_code' => 'ZW', 'phonecode' => '+263'),
array('id' => '248', 'name' => 'Kosovo', 'iso_code' => 'XK', 'phonecode' => '+383'),
array('id' => '249', 'name' => 'Curaçao', 'iso_code' => 'CW', 'phonecode' => '+599'),
array('id' => '250', 'name' => 'Sint Maarten (Dutch part)', 'iso_code' => 'SX', 'phonecode' => '+1721')
);
return $countries;
}
/**
* Country wise country code & phone code
*
* @return string[][]
*/
function country_with_calling_codes()
{
/*return [
'bd' => [
'bd' => '+880',
'name' => 'Bangladesh'
],
'af' => [
'af' => '+93',
'name' => 'Afghanistan'
],
'ad' => [
'ad' => '+376',
'name' => 'Andorra'
],
'ao' => [
'ao' => '+244',
'name' => 'Angola'
]
];*/
/*$countries = countries_code();
$countries_arr = [];
foreach ($countries as $country){
$iso_code = strtolower($country['iso_code']);
$countries_arr[$iso_code] = [
$iso_code => $country['phonecode'],
'name' => $country['name'],
];
}
return $countries_arr;*/
$countries = [
'af' => [
'af' => '+93',
'name' => 'Afghanistan'
],
/*'ax' => [
'ax' => '+358-18',
'name' => 'Aland Islands'
],*/
'al' => [
'al' => '+355',
'name' => 'Albania'
],
'dz' => [
'dz' => '+213',
'name' => 'Algeria'
],
/*'as' => [
'as' => '+1-684',
'name' => 'American Samoa'
],*/
'ad' => [
'ad' => '+376',
'name' => 'Andorra'
],
'ao' => [
'ao' => '+244',
'name' => 'Angola'
],
/* 'ai' => [
'ai' => '+1-264',
'name' => 'Anguilla'
],*/
'aq' => [
'aq' => '+672',
'name' => 'Antarctica'
],
/*'ag' => [
'ag' => '+1-268',
'name' => 'Antigua And Barbuda'
],*/
'ar' => [
'ar' => '+54',
'name' => 'Argentina'
],
'am' => [
'am' => '+374',
'name' => 'Armenia'
],
'aw' => [
'aw' => '+297',
'name' => 'Aruba'
],
'au' => [
'au' => '+61',
'name' => 'Australia'
],
'at' => [
'at' => '+43',
'name' => 'Austria'
],
'az' => [
'az' => '+994',
'name' => 'Azerbaijan'
],
/*'bs' => [
'bs' => '+1-242',
'name' => 'Bahamas The'
],*/
'bh' => [
'bh' => '+973',
'name' => 'Bahrain'
],
'bd' => [
'bd' => '+880',
'name' => 'Bangladesh'
],
/*'bb' => [
'bb' => '+1-246',
'name' => 'Barbados'
],*/
'by' => [
'by' => '+375',
'name' => 'Belarus'
],
'be' => [
'be' => '+32',
'name' => 'Belgium'
],
'bz' => [
'bz' => '+501',
'name' => 'Belize'
],
'bj' => [
'bj' => '+229',
'name' => 'Benin'
],
/*'bm' => [
'bm' => '+1-441',
'name' => 'Bermuda'
],*/
'bt' => [
'bt' => '+975',
'name' => 'Bhutan'
],
'bo' => [
'bo' => '+591',
'name' => 'Bolivia'
],
'ba' => [
'ba' => '+387',
'name' => 'Bosnia and Herzegovina'
],
'bw' => [
'bw' => '+267',
'name' => 'Botswana'
],
/*'bv' => [
'bv' => '+0055',
'name' => 'Bouvet Island'
],*/
'br' => [
'br' => '+55',
'name' => 'Brazil'
],
'io' => [
'io' => '+246',
'name' => 'British Indian Ocean Territory'
],
'bn' => [
'bn' => '+673',
'name' => 'Brunei'
],
'bg' => [
'bg' => '+359',
'name' => 'Bulgaria'
],
'bf' => [
'bf' => '+226',
'name' => 'Burkina Faso'
],
'bi' => [
'bi' => '+257',
'name' => 'Burundi'
],
'kh' => [
'kh' => '+855',
'name' => 'Cambodia'
],
'cm' => [
'cm' => '+237',
'name' => 'Cameroon'
],
'ca' => [
'ca' => '+1',
'name' => 'Canada'
],
'cv' => [
'cv' => '+238',
'name' => 'Cape Verde'
],
/*'ky' => [
'ky' => '+1-345',
'name' => 'Cayman Islands'
],*/
'cf' => [
'cf' => '+236',
'name' => 'Central African Republic'
],
'td' => [
'td' => '+235',
'name' => 'Chad'
],
'cl' => [
'cl' => '+56',
'name' => 'Chile'
],
'cn' => [
'cn' => '+86',
'name' => 'China'
],
'cx' => [
'cx' => '+61',
'name' => 'Christmas Island'
],
'cc' => [
'cc' => '+61',
'name' => 'Cocos (Keeling) Islands'
],
'co' => [
'co' => '+57',
'name' => 'Colombia'
],
'km' => [
'km' => '+269',
'name' => 'Comoros'
],
'cg' => [
'cg' => '+242',
'name' => 'Congo'
],
'cd' => [
'cd' => '+243',
'name' => 'Democratic Republic of the Congo'
],
'ck' => [
'ck' => '+682',
'name' => 'Cook Islands'
],
'cr' => [
'cr' => '+506',
'name' => 'Costa Rica'
],
'ci' => [
'ci' => '+225',
'name' => 'Cote D\'Ivoire (Ivory Coast)'
],
'hr' => [
'hr' => '+385',
'name' => 'Croatia'
],
'cu' => [
'cu' => '+53',
'name' => 'Cuba'
],
'cy' => [
'cy' => '+357',
'name' => 'Cyprus'
],
'cz' => [
'cz' => '+420',
'name' => 'Czech Republic'
],
'dk' => [
'dk' => '+45',
'name' => 'Denmark'
],
'dj' => [
'dj' => '+253',
'name' => 'Djibouti'
],
/*'dm' => [
'dm' => '+1-767',
'name' => 'Dominica'
],*/
/* 'do' => [
'do' => '+1-809 and 1-829',
'name' => 'Dominican Republic'
],*/
'tl' => [
'tl' => '+670',
'name' => 'East Timor'
],
'ec' => [
'ec' => '+593',
'name' => 'Ecuador'
],
'eg' => [
'eg' => '+20',
'name' => 'Egypt'
],
'sv' => [
'sv' => '+503',
'name' => 'El Salvador'
],
'gq' => [
'gq' => '+240',
'name' => 'Equatorial Guinea'
],
'er' => [
'er' => '+291',
'name' => 'Eritrea'
],
'ee' => [
'ee' => '+372',
'name' => 'Estonia'
],
'et' => [
'et' => '+251',
'name' => 'Ethiopia'
],
'fk' => [
'fk' => '+500',
'name' => 'Falkland Islands'
],
'fo' => [
'fo' => '+298',
'name' => 'Faroe Islands'
],
'fj' => [
'fj' => '+679',
'name' => 'Fiji Islands'
],
'fi' => [
'fi' => '+358',
'name' => 'Finland'
],
'fr' => [
'fr' => '+33',
'name' => 'France'
],
'gf' => [
'gf' => '+594',
'name' => 'French Guiana'
],
'pf' => [
'pf' => '+689',
'name' => 'French Polynesia'
],
'tf' => [
'tf' => '+262',
'name' => 'French Southern Territories'
],
'ga' => [
'ga' => '+241',
'name' => 'Gabon'
],
'gm' => [
'gm' => '+220',
'name' => 'Gambia The'
],
'ge' => [
'ge' => '+995',
'name' => 'Georgia'
],
'de' => [
'de' => '+49',
'name' => 'Germany'
],
'gh' => [
'gh' => '+233',
'name' => 'Ghana'
],
'gi' => [
'gi' => '+350',
'name' => 'Gibraltar'
],
'gr' => [
'gr' => '+30',
'name' => 'Greece'
],
'gl' => [
'gl' => '+299',
'name' => 'Greenland'
],
/*'gd' => [
'gd' => '+1-473',
'name' => 'Grenada'
],*/
'gp' => [
'gp' => '+590',
'name' => 'Guadeloupe'
],
/*'gu' => [
'gu' => '+1-671',
'name' => 'Guam'
],*/
'gt' => [
'gt' => '+502',
'name' => 'Guatemala'
],
/*'gg' => [
'gg' => '+44-1481',
'name' => 'Guernsey and Alderney'
],*/
'gn' => [
'gn' => '+224',
'name' => 'Guinea'
],
'gw' => [
'gw' => '+245',
'name' => 'Guinea-Bissau'
],
'gy' => [
'gy' => '+592',
'name' => 'Guyana'
],
'ht' => [
'ht' => '+509',
'name' => 'Haiti'
],
'hm' => [
'hm' => '+672',
'name' => 'Heard Island and McDonald Islands'
],
'hn' => [
'hn' => '+504',
'name' => 'Honduras'
],
'hk' => [
'hk' => '+852',
'name' => 'Hong Kong S.A.R.'
],
'hu' => [
'hu' => '+36',
'name' => 'Hungary'
],
'is' => [
'is' => '+354',
'name' => 'Iceland'
],
'in' => [
'in' => '+91',
'name' => 'India'
],
'id' => [
'id' => '+62',
'name' => 'Indonesia'
],
'ir' => [
'ir' => '+98',
'name' => 'Iran'
],
'iq' => [
'iq' => '+964',
'name' => 'Iraq'
],
'ie' => [
'ie' => '+353',
'name' => 'Ireland'
],
'il' => [
'il' => '+972',
'name' => 'Israel'
],
'it' => [
'it' => '+39',
'name' => 'Italy'
],
/*'jm' => [
'jm' => '+1-876',
'name' => 'Jamaica'
],*/
'jp' => [
'jp' => '+81',
'name' => 'Japan'
],
/*'je' => [
'je' => '+44-1534',
'name' => 'Jersey'
],*/
'jo' => [
'jo' => '+962',
'name' => 'Jordan'
],
'kz' => [
'kz' => '+7',
'name' => 'Kazakhstan'
],
'ke' => [
'ke' => '+254',
'name' => 'Kenya'
],
'ki' => [
'ki' => '+686',
'name' => 'Kiribati'
],
'kp' => [
'kp' => '+850',
'name' => 'North Korea'
],
'kr' => [
'kr' => '+82',
'name' => 'South Korea'
],
'kw' => [
'kw' => '+965',
'name' => 'Kuwait'
],
'kg' => [
'kg' => '+996',
'name' => 'Kyrgyzstan'
],
'la' => [
'la' => '+856',
'name' => 'Laos'
],
'lv' => [
'lv' => '+371',
'name' => 'Latvia'
],
'lb' => [
'lb' => '+961',
'name' => 'Lebanon'
],
'ls' => [
'ls' => '+266',
'name' => 'Lesotho'
],
'lr' => [
'lr' => '+231',
'name' => 'Liberia'
],
'ly' => [
'ly' => '+218',
'name' => 'Libya'
],
'li' => [
'li' => '+423',
'name' => 'Liechtenstein'
],
'lt' => [
'lt' => '+370',
'name' => 'Lithuania'
],
'lu' => [
'lu' => '+352',
'name' => 'Luxembourg'
],
'mo' => [
'mo' => '+853',
'name' => 'Macau S.A.R.'
],
'mk' => [
'mk' => '+389',
'name' => 'Macedonia'
],
'mg' => [
'mg' => '+261',
'name' => 'Madagascar'
],
'mw' => [
'mw' => '+265',
'name' => 'Malawi'
],
'my' => [
'my' => '+60',
'name' => 'Malaysia'
],
'mv' => [
'mv' => '+960',
'name' => 'Maldives'
],
'ml' => [
'ml' => '+223',
'name' => 'Mali'
],
'mt' => [
'mt' => '+356',
'name' => 'Malta'
],
/*'im' => [
'im' => '+44-1624',
'name' => 'Man (Isle of)'
],*/
'mh' => [
'mh' => '+692',
'name' => 'Marshall Islands'
],
'mq' => [
'mq' => '+596',
'name' => 'Martinique'
],
'mr' => [
'mr' => '+222',
'name' => 'Mauritania'
],
'mu' => [
'mu' => '+230',
'name' => 'Mauritius'
],
'yt' => [
'yt' => '+262',
'name' => 'Mayotte'
],
'mx' => [
'mx' => '+52',
'name' => 'Mexico'
],
'fm' => [
'fm' => '+691',
'name' => 'Micronesia'
],
'md' => [
'md' => '+373',
'name' => 'Moldova'
],
'mc' => [
'mc' => '+377',
'name' => 'Monaco'
],
'mn' => [
'mn' => '+976',
'name' => 'Mongolia'
],
'me' => [
'me' => '+382',
'name' => 'Montenegro'
],
/*'ms' => [
'ms' => '+1-664',
'name' => 'Montserrat'
],*/
'ma' => [
'ma' => '+212',
'name' => 'Morocco'
],
'mz' => [
'mz' => '+258',
'name' => 'Mozambique'
],
'mm' => [
'mm' => '+95',
'name' => 'Myanmar'
],
'na' => [
'na' => '+264',
'name' => 'Namibia'
],
'nr' => [
'nr' => '+674',
'name' => 'Nauru'
],
'np' => [
'np' => '+977',
'name' => 'Nepal'
],
'bq' => [
'bq' => '+599',
'name' => 'Bonaire, Sint Eustatius and Saba'
],
'nl' => [
'nl' => '+31',
'name' => 'Netherlands'
],
'nc' => [
'nc' => '+687',
'name' => 'New Caledonia'
],
'nz' => [
'nz' => '+64',
'name' => 'New Zealand'
],
'ni' => [
'ni' => '+505',
'name' => 'Nicaragua'
],
'ne' => [
'ne' => '+227',
'name' => 'Niger'
],
'ng' => [
'ng' => '+234',
'name' => 'Nigeria'
],
'nu' => [
'nu' => '+683',
'name' => 'Niue'
],
'nf' => [
'nf' => '+672',
'name' => 'Norfolk Island'
],
/*'mp' => [
'mp' => '+1-670',
'name' => 'Northern Mariana Islands'
],*/
'no' => [
'no' => '+47',
'name' => 'Norway'
],
'om' => [
'om' => '+968',
'name' => 'Oman'
],
'pk' => [
'pk' => '+92',
'name' => 'Pakistan'
],
'pw' => [
'pw' => '+680',
'name' => 'Palau'
],
'ps' => [
'ps' => '+970',
'name' => 'Palestinian Territory Occupied'
],
'pa' => [
'pa' => '+507',
'name' => 'Panama'
],
'pg' => [
'pg' => '+675',
'name' => 'Papua new Guinea'
],
'py' => [
'py' => '+595',
'name' => 'Paraguay'
],
'pe' => [
'pe' => '+51',
'name' => 'Peru'
],
'ph' => [
'ph' => '+63',
'name' => 'Philippines'
],
'pn' => [
'pn' => '+870',
'name' => 'Pitcairn Island'
],
'pl' => [
'pl' => '+48',
'name' => 'Poland'
],
'pt' => [
'pt' => '+351',
'name' => 'Portugal'
],
/*'pr' => [
'pr' => '+1-787 and 1-939',
'name' => 'Puerto Rico'
],*/
'qa' => [
'qa' => '+974',
'name' => 'Qatar'
],
're' => [
're' => '+262',
'name' => 'Reunion'
],
'ro' => [
'ro' => '+40',
'name' => 'Romania'
],
'ru' => [
'ru' => '+7',
'name' => 'Russia'
],
'rw' => [
'rw' => '+250',
'name' => 'Rwanda'
],
'sh' => [
'sh' => '+290',
'name' => 'Saint Helena'
],
/*'kn' => [
'kn' => '+1-869',
'name' => 'Saint Kitts And Nevis'
],*/
/*'lc' => [
'lc' => '+1-758',
'name' => 'Saint Lucia'
],*/
'pm' => [
'pm' => '+508',
'name' => 'Saint Pierre and Miquelon'
],
/*'vc' => [
'vc' => '+1-784',
'name' => 'Saint Vincent And The Grenadines'
],*/
'bl' => [
'bl' => '+590',
'name' => 'Saint-Barthelemy'
],
'mf' => [
'mf' => '+590',
'name' => 'Saint-Martin (French part)'
],
'ws' => [
'ws' => '+685',
'name' => 'Samoa'
],
'sm' => [
'sm' => '+378',
'name' => 'San Marino'
],
'st' => [
'st' => '+239',
'name' => 'Sao Tome and Principe'
],
'sa' => [
'sa' => '+966',
'name' => 'Saudi Arabia'
],
'sn' => [
'sn' => '+221',
'name' => 'Senegal'
],
'rs' => [
'rs' => '+381',
'name' => 'Serbia'
],
'sc' => [
'sc' => '+248',
'name' => 'Seychelles'
],
'sl' => [
'sl' => '+232',
'name' => 'Sierra Leone'
],
'sg' => [
'sg' => '+65',
'name' => 'Singapore'
],
'sk' => [
'sk' => '+421',
'name' => 'Slovakia'
],
'si' => [
'si' => '+386',
'name' => 'Slovenia'
],
'sb' => [
'sb' => '+677',
'name' => 'Solomon Islands'
],
'so' => [
'so' => '+252',
'name' => 'Somalia'
],
'za' => [
'za' => '+27',
'name' => 'South Africa'
],
'gs' => [
'gs' => '+500',
'name' => 'South Georgia'
],
'ss' => [
'ss' => '+211',
'name' => 'South Sudan'
],
'es' => [
'es' => '+34',
'name' => 'Spain'
],
'lk' => [
'lk' => '+94',
'name' => 'Sri Lanka'
],
'sd' => [
'sd' => '+249',
'name' => 'Sudan'
],
'sr' => [
'sr' => '+597',
'name' => 'Suriname'
],
'sj' => [
'sj' => '+47',
'name' => 'Svalbard And Jan Mayen Islands'
],
'sz' => [
'sz' => '+268',
'name' => 'Swaziland'
],
'se' => [
'se' => '+46',
'name' => 'Sweden'
],
'ch' => [
'ch' => '+41',
'name' => 'Switzerland'
],
'sy' => [
'sy' => '+963',
'name' => 'Syria'
],
'tw' => [
'tw' => '+886',
'name' => 'Taiwan'
],
'tj' => [
'tj' => '+992',
'name' => 'Tajikistan'
],
'tz' => [
'tz' => '+255',
'name' => 'Tanzania'
],
'th' => [
'th' => '+66',
'name' => 'Thailand'
],
'tg' => [
'tg' => '+228',
'name' => 'Togo'
],
'tk' => [
'tk' => '+690',
'name' => 'Tokelau'
],
'to' => [
'to' => '+676',
'name' => 'Tonga'
],
/*'tt' => [
'tt' => '+1-868',
'name' => 'Trinidad And Tobago'
],*/
'tn' => [
'tn' => '+216',
'name' => 'Tunisia'
],
'tr' => [
'tr' => '+90',
'name' => 'Turkey'
],
'tm' => [
'tm' => '+993',
'name' => 'Turkmenistan'
],
/*'tc' => [
'tc' => '+1-649',
'name' => 'Turks And Caicos Islands'
],*/
'tv' => [
'tv' => '+688',
'name' => 'Tuvalu'
],
'ug' => [
'ug' => '+256',
'name' => 'Uganda'
],
'ua' => [
'ua' => '+380',
'name' => 'Ukraine'
],
'ae' => [
'ae' => '+971',
'name' => 'United Arab Emirates'
],
'gb' => [
'gb' => '+44',
'name' => 'United Kingdom'
],
'us' => [
'us' => '+1',
'name' => 'United States'
],
'um' => [
'um' => '+1',
'name' => 'United States Minor Outlying Islands'
],
'uy' => [
'uy' => '+598',
'name' => 'Uruguay'
],
'uz' => [
'uz' => '+998',
'name' => 'Uzbekistan'
],
'vu' => [
'vu' => '+678',
'name' => 'Vanuatu'
],
'va' => [
'va' => '+379',
'name' => 'Vatican City State (Holy See)'
],
've' => [
've' => '+58',
'name' => 'Venezuela'
],
'vn' => [
'vn' => '+84',
'name' => 'Vietnam'
],
/*'vg' => [
'vg' => '+1-284',
'name' => 'Virgin Islands (British)'
],*/
/*'vi' => [
'vi' => '+1-340',
'name' => 'Virgin Islands (US)'
],*/
'wf' => [
'wf' => '+681',
'name' => 'Wallis And Futuna Islands'
],
'eh' => [
'eh' => '+212',
'name' => 'Western Sahara'
],
'ye' => [
'ye' => '+967',
'name' => 'Yemen'
],
'zm' => [
'zm' => '+260',
'name' => 'Zambia'
],
'zw' => [
'zw' => '+263',
'name' => 'Zimbabwe'
],
'xk' => [
'xk' => '+383',
'name' => 'Kosovo'
],
'cw' => [
'cw' => '+599',
'name' => 'Curaçao'
],
'sx' => [
'sx' => '+1721',
'name' => 'Sint Maarten (Dutch part)'
]
];
return $countries;
}
/**
* Get Country wise phone calling code
*
* @return string[][]
*/
function phone_country_calling_code($country_code)
{
$country_codes = country_with_calling_codes();
if (isset($country_codes[$country_code])) {
if (isset($country_codes[$country_code][$country_code])) {
return $country_codes[$country_code][$country_code];
}
}
return '+880';
}
/**
* Get country iso code wise country name
*/
function country_iso_country_name($country_code)
{
$country_codes = country_with_calling_codes();
if (isset($country_codes[$country_code])) {
if (isset($country_codes[$country_code]['name'])) {
return $country_codes[$country_code]['name'];
}
}
return 'Bangladesh';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment