1. Go to this page and download the library: Download blvckgvd/currencylib 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/ */
blvckgvd / currencylib example snippets
use Blvckgvd\Currencylib\CurrencyLib;
public function convertPrice() {
$price = CurrencyLib::convert('USD', 'EUR', 350, 2);
return $price;
}
// Converted from US Dollars to Euros number
use Blvckgvd\Currencylib\CurrencyLib;
public function convertPriceWithSymbol() {
$price = CurrencyLib::convertWithCurrencySymbol('USD', 'EUR', 350, 2);
return $price;
}
// Converted from US Dollars to Euros number with symbol €
use Blvckgvd\Currencylib\CurrencyLib;
public function getSymbol() {
$symbol = CurrencyLib::getCurrencySymbol('JPY');
return $symbol;
}
// Get symbol from currency code, at this situation you'll get ¥
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.