PHP code example of xtomdex / yii2-widget-country

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

    

xtomdex / yii2-widget-country example snippets


<?= \xtomdex\widgets\CountrySelect::widget([
    'preferredCountries' => ['UA', 'RU', 'BY'], //these countries will be at the top
    'enableIpCountryFirst' => true, //sets user IP country to the top (preferred countries go next), by default is true
    'displayFlags' => true, //displays country flag images next to their names, by default is true
    /*
     * Select2 config
     */
]); 

php composer.phar