PHP code example of lessmore92 / timezonelist

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

    

lessmore92 / timezonelist example snippets


...
'providers' => array(
    ...
    Lessmore92\Timezonelist\TimezonelistServiceProvider::class,
),

...

'aliases' => [
    'Timezonelist' => Lessmore92\Timezonelist\Facades\Timezonelist::class,
],

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();