php - Money_format,移动 'currency name'

标签 php currency money-format

我目前正在使用 PHP money_format() function ,并且此时有 money_format('%.0i', $row['price']) 输出如下内容:DKK 199.900 - 有没有办法可以将其输出为 199.900 DKK

最佳答案

改用number_format(这也是跨操作系统兼容的):

$value = number_format($value, [decimal places]).' DKK';

关于php - Money_format,移动 'currency name',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9667155/

相关文章:

javascript - 从整个页面中选择 div 内的前 n li 个元素

javascript - 我们如何访问angular js中的php变量?

当源有超过 2 位小数时,SSIS 如何将字符串(DT_STR)转换为货币(DT_CY)

SharePoint (2010) : Field for (multi) currency. ..?

php - 将使用 PayPal 支付的 Magento 中不接受的货币转换为美元

php - 使用 money_format() 时如何输出缩写货币符号而不是货币名称?

php - 与 CENTS 之间的转换

CentOS 6.5 上的 PHP 无法连接到 Postgres DB

php - 使用 Mysql Query Profiler 了解查询的执行时间和 php 脚本中的性能

ruby-on-rails - Money Rails Gem - 空值