How php uses NumberFormatter to format currency
Editor to share with you how php uses NumberFormatter to format currency, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The specific implementation methods are as follows:
$amount = '12345.67 destroy formatter = new NumberFormatter (' en_GB', NumberFormatter::CURRENCY); echo'UK:'. $formatter- > formatCurrency ($amount, 'EUR'). PHP_EOL;$formatter = new NumberFormatter ('de_DE', NumberFormatter::CURRENCY); echo' DE:'. $formatter- > formatCurrency ($amount, 'EUR'). PHP_EOL; above is all the content of the article "how to use NumberFormatter to format currency in php". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!