我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

插入的最佳方式。 或者,在显示钱时的整数

I have an integer 1000 - I would like to show it to the users as 10.00

I am wondering the best solution/practice for this?

Have tried the following, but none of these are the desired result:

<?php
echo number_format("1000")."<br>";
echo number_format("1000",2)."<br>";
echo number_format("1000",2,",",".");
?>

Outputs the following:

1,000
1,000.00
1.000,00

近期文章

  • 如何基于整数值将数组拆分为两个数组
  • 如何使用laravel实现/处理自动出价?
  • PHP对象运算符是数字
  • 在codeigniter中将项目添加到购物车时,在来自url:message的响应中忽略Set-Cookie标头
  • opencart 3缓存权限
  • 加载更多按钮只能工作一次
  • Wordpress自定义帖子类型路径
  • WordPress在wp_die之后发布帖子
  • PHP没有为下载文件而努力
  • Cron作业根据时间重命名媒体文件
  • 使用PHP / JS / MYSQL恢复标识或值
  • 使用PHP从Android Studio向mySQL数据库发送值
  • 在iframe中使用laravel应用程序 - 登录无法正常工作
  • 用链接替换文本中的单词,但不用图片替换
  • 动态数组php(在relod php表单后将数据附加到数组)
  • 在Edi记事本中打开837 Edi文件后发生无效的实际(数据类型)错误
  • 如何使用rateYo插件的键盘事件(左,右箭头)
  • Php multisort with strftime
  • 像PHP一样有条件的Vue循环
  • 如何从docusign API获取文档?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华