PHP code example of vajiral / simple-currency-converter

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

    

vajiral / simple-currency-converter example snippets




use BigV\CurrencyCodes;
use BigV\CurrencyConverter;

ncyFrom(CurrencyCodes::ISO_USD);
$converter->setCurrencyTo(CurrencyCodes::ISO_LKR);
$converter->setAmount(10);

$result = $converter->convertCurrency();