note 116420 deleted from numberformatter.formatcurrency by salathe
| From: | salathe@php.net | Date: | Fri, 02 Jan 2015 11:34:23 +0000 |
| Subject: | note 116420 deleted from numberformatter.formatcurrency by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201337@lists.php.net to get a copy of this message | ||
Note Submitter: Joel D
----
To remove the currency symbol from being outputted, but still have the rest of the number formatted
like currency, you can use:
$fmt = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);
$fmt->setPattern(str_replace(array("\xc2\xa0\xc2\xa4", "\xc2\xa4\xc2\xa0",
"\xc2\xa4"), '', $fmt->getPattern()));
echo $fmt->formatCurrency(28472.48, 'GBP')