PHP code example of nexuslinkservices / country-currency-converter

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

    

nexuslinkservices / country-currency-converter example snippets




use CountryCurrencyConverter\CurrencyConverter;

$currencyConverter = new CurrencyConverter();

$result = $currencyConverter->convertCurrency('USD', 'INR', 1); 
echo $result.'<br/>';

$result = $currencyConverter->convertCurrency('USD', 'INR', 1, false);
echo $result.'<br/>';

$result = $currencyConverter->convertCurrency('USD', 'INR', 1, false, false);
echo $result;