在PHP中,是否可以使用money_format显示货币而不显示货币,或者至少以缩写形式显示货币?
目前,我使用:
$money = "1234.56";
setlocale("LC_ALL", "de_DE");
$money = money_format("%n", $money);
发布于 2011-07-06 02:31:12
好了!
我是认真的。这就是标志:
$money = money_format("%!n", $money);
发布于 2011-07-06 02:31:20
试用number_format($money)
发布于 2017-08-19 13:42:20
// this if for Malaysia , you can check according to your locality
$number = new NumberFormatter($locale = 'ms_MS.utf8', NumberFormatter::DECIMAL);
echo $nmuber->format($amount)."\n"; ## 20,00,00,00,000
// if this give error
Class 'NumberFormatter' not found
// for this you can do you can do a
apt-get install php7.0-intl
https://stackoverflow.com/questions/6587179
复制相似问题