note 126488 deleted from numberformatter.parsecurrency by cmb
| From: | cmb@php.net | Date: | Fri, 08 Oct 2021 13:40:17 +0000 |
| Subject: | note 126488 deleted from numberformatter.parsecurrency by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-217048@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
The example above is wrong, you have to use formatCurrency instead of parseCurrency
$region = 'fr_FR';
$currency = 'EUR';
$formatter = new \NumberFormatter($region, \NumberFormatter::CURRENCY);
$formatter->formatCurrency(12543.67, $currency);