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

如何打印0.00009和更低的数字[重复]

This question already has an answer here:

  • Convert a big integer to a full string in PHP 4 answers

Trying to echo 0.00009 number gives me 9.0E-5 tryed to do

echo number_format($number);

it echoes 0, maybe someone could explain me how to print my number and even lower ones.

</div>

You probably want something like this...

number_format($number, 5, '.', '');

That should give you the number to 5 decimal places, using . for the decimal (English format).

Reference: http://php.net/manual/en/function.number-format.php

近期文章

  • 从表中返回一组联系人
  • 页面重定向。 会话数据丢失
  • cakephp手动sql查询在一个表中
  • 用php [关闭]从2个mysql表中获取数据
  • 使用标题重定向到其他页面
  • preg_match正确的正则表达式
  • 如果Codeigniter不存在则插入
  • xampp htaccess目录到子域
  • 没有临时文件夹(无法上传文件)
  • zendframework 2 elfinder助手错误
  • 无法弄清楚如何开始使用PHP [关闭]
  • 数据没有保存到PHP中的两个表
  • 阅读.rtf文档的完整内容
  • 无法插入多个数据需要救援
  • 使用回车键表单提交错误
  • 在C#中解密PHP加密字符串
  • 仅在PHP或HTML中可编辑的组合框
  • 从codeigniter中的文件夹加载模型
  • 如何在PHP的头文件中包含CSS? [关闭]
  • 试图在PHP中更新mysql数据库

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华