PHP code example of luppakorva / timezonelist

1. Go to this page and download the library: Download luppakorva/timezonelist 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/ */

    

luppakorva / timezonelist example snippets


Timezonelist::create('timezone');

Timezonelist::create($name, $selected, $attr);

Timezonelist::create('timezone', 'Asia/Ho_Chi_Minh');

Timezonelist::create('timezone', null, 'class="styled"');

Timezonelist::create('timezone', null, 'id="timezone" class="styled"');

Timezonelist::create('timezone', null, [
    'id'    => 'timezone',
    'class' => 'styled',
    ...
]);

$timezone_list = Timezonelist::toArray();