nexuslinkservices / country-currency-converter
v1.0.0
2016-10-07 13:34 UTC
Requires
- php: >=5.6.2
Requires (Dev)
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2024-09-14 20:09:36 UTC
README
通过货币代码转换国家货币。
安装
如果您使用composer,可以通过运行以下命令添加此包
composer require galiteintechnologies/country-currency-converter
用法
<?php
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;
输出
66.59 ₹ //With round value and currency symbol
66.5922 ₹ //without round value
66.5922 // without round value and currency symbol
贡献
欢迎提交拉取请求。