PHP code example of tentwofour / intl

1. Go to this page and download the library: Download tentwofour/intl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tentwofour / intl example snippets


$provinces = CountryHelper::getCanadianProvinces();

[
    'AB' => 'Alberta',
    'BC' => 'British Columbia',
    'MB' => 'Manitoba',
    'NB' => 'New Brunswick',
    'NL' => 'Newfoundland and Labrador',
    'NS' => 'Nova Scotia',
    'NU' => 'Nunavut',
    'NT' => 'Northwest Territories',
    'ON' => 'Ontario',
    'PE' => 'Prince Edward Island',
    'QC' => 'Quebec',
    'SK' => 'Saskatchewan',
    'YT' => 'Yukon'
];


$provinces = CountryHelper::getCanadianProvinceAbbreviations();

[
    0 => 'AB',
    1 => 'BC',
    2 => 'MB',
    3 => 'NB',
    4 => 'NL',
    5 => 'NS',
    6 => 'NU',
    7 => 'NT',
    8 => 'ON',
    9 => 'PE',
    10 => 'QC',
    11 => 'SK',
    12 => 'YT'
];