When there is an array of symbols in a currency, and you always want to choose the second one without specifying this, you can set your preferred symbol.
Parameters:
[int $index = 0]
(optional) - index of the array.
Returns: Currency
use PostScripton\Money\Currency;
$currency = currency("EGP");
$currency->setPreferredSymbol(1);
// ["£", "ج.م"]
$currency->getSymbol(); // "ج.م"
$currency->getSymbol(0); // "£"
$currency->getSymbol(1); // "ج.م"
📌 Back to the contents.