PHP code example of shiftpi / country-flags

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

    

shiftpi / country-flags example snippets


// ...
'modules' => array(
    // ...
    'ShiftpiCountryFlags',
    // ...
),
// ...

return array(
    'countryflags' => array(
        'mapper' => 'ShiftpiCountryFlags\Mapper\Filename',      // country code -> file path mapper
        'datapath' => '/alternative/data/path',                 // new since 0.1.1; optional
    ),
);
html
<img src=" echo $this->countryFlagUrl('SC', 64)