开发者

symfony: format_currency() adds an space before the number

when i do this:

var_dump(format_currency('1004.569'));       

I get:

string ' 1.004,56' (length=10)

Notice that there is a space before the 1.

Any idea?

sf 1.4.

Ja开发者_如何转开发vi


The space is where currency symbol belongs. This is because you haven't set the users default culture. If you pass "usd" as the second parameter you should get $1.004,56.

format_currency('1004.569', "usd")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜