Get currency symbol in PHP

前端 未结 8 831
春和景丽
春和景丽 2020-12-14 00:07

Let\'s start with simple piece of code to format money with NumberFormatter:

$formatter = new NumberFormatter(\'en_US\', NumberFormatter::CURREN         


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 01:10

    Try this variant:

    $formatter->getSymbol(NumberFormatter::INTL_CURRENCY_SYMBOL);
    

提交回复
热议问题