首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

数字格式化

整理日期:2007年03月02日 【字体:

之前曾经一直使用自己定义的数字格式化方法,原来PHP一直有个数字格式化函数的,呵呵~
例如,echo number_format(285266237);
可以输出 285,266,237
另外如果需要格式化文件字节大小,下面的方法可以借鉴:
function byte_format($input, $dec=0)
{
 $prefix_arr = array(" B", "K", "M", "G", "T");
 $value = round($input, $dec);
 $i=0;

伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-03/1172834650.html
 while ($value>1024)
Tags:
数字格式化
'http://www.etoow.com/html/2007-03/1172834650.html
1
 
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved