diversen/intl-phone

Get intl dial code info from country code

1.0.0 2016-02-12 10:49 UTC

This package is auto-updated.

Last update: 2024-10-20 07:47:16 UTC


README

Get intl dial code info from country code (ISO 3166-1 alpha-2 code) See: https://en.wikipedia.org/wiki/ISO_3166-1

Install:

composer require diversen/intl-phone

Usage:

include_once "vendor/autoload.php";

use \diversen\intl\phone;

$p = new phone();
$ary = $p->getCountryInformation('dk');

print_r($ary);

Yields:

Array
(
    [country_name] => DENMARK
    [dial_code] => 45
)