0
setlocale(LC_MONETARY, 'en_US');
$str = money_format('%=*#4.4n',163.17852837291);

返回. $**163.1785_$str

我想打印$✪✪163.1785,而不是。

我该如何解决这个问题?

4

2 回答 2

1
于 2019-01-23T22:51:41.803 回答
0

You could define a specific-function this way:

function m_money_format($f, $s)
{
    return str_replace("*", "&\#x272a;", money_format($f,$s));
}

setlocale(LC_MONETARY, 'en_US');
$str = m_money_format($f, $s);

So you can call the function whenever you need it, in every part of you code

于 2019-01-23T22:51:56.940 回答