|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not enough user ratings||Total: 150 ||All time: 9,006 This week: 313|
This class can get the symbol of any given currency.
It can take as parameter of code of a given currency.
The class can return the symbol associated to that currency.
|Each currency used in different countries to represent money has a symbol that is associated the currency which is used to make clear when a given money amount is displayed so other people can see prices or other values that represent money.
This class can return the symbols used to represent many currencies using pure PHP, thus not relying on the availability of any PHP extension for that purpose.
A simple library to lookup the currency symbol for a given currency code.
composer req terdia/currency-util
Get symbol from currency code
CurrencySymbolUtil::getSymbol('GBP') //=> '£'
CurrencySymbolUtil::getSymbol('EUR') //=> '?'
CurrencySymbolUtil::getSymbol('USD') //=> '$'
CurrencySymbolUtil::getSymbol('NOT A VALID CODE') throw InvalidArgumentException
Get List of supported currency code
"USD" => "$",
"GBP" => "£",
"EUR" => "?",
Feel free to contribute to this library.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.