在PHP中,是否可以使用money_format显示货币而不显示货币,或者至少以缩写形式显示货币?
目前,我使用:
$money = "1234.56";
setlocale("LC_ALL", "de_DE");
$money = money_format("%n", $money);
!
说真的。那是旗帜:
$money = money_format("%!n", $money);
try number_format($money(
http://php.net/manual/en/function.number-format.php
// 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