array
CCurrency::GetByID(
string currency
);
The method GetByID returns an array of the language independent
parameters of a currency by its identifier.
Parameters
Parameter | Description |
currency |
The currency identifier. |
Return Values
Associated array with the following keys.
Key |
Description |
CURRENCY |
The three character currency code. |
AMOUNT_CNT |
The number of currency units used by default to define the rate
of exchange (for example, if CYP 10 equal to USD 21.58, 10 is the number
of currency units). |
AMOUNT |
The default rate of exchange. (One of currencies within a site
must equal to 1. Such currency is called a base currency. Other
currencies are defined relative to the base currency.) |
SORT |
Sort order. |
DATE_UPDATE |
The date that the record was last modified. |
See also
CCurrency::GetCurrency
Example
<?
if (!($ar_usd_cur = CCurrency::GetByID("USD")))
{
echo "The USD currency cannot be found";
}
else
{
echo "The USD currency has the following parameters:<pre>";
print_r($ar_usd_cur);
echo "</pre>";
}
?>