将1234567890----->1,234,567,890
2016-11-16 17:56
344 查看
<?php //$contents=file_get_contents('http://news.baidu.com/'); header('Content-type:text/html;charset=utf8'); //将1234567890----->1,234,567,890 $str='1234567890'; $strArr=str_split(strrev($str),3); //print_r($strArr);//Array ( [0] => 098 [1] => 765 [2] => 432 [3] => 1 ) echo strrev(implode(',',$strArr)).'<br />';//---->1,234,567,890 //implode把数组拼接为字符串; ?>
相关文章推荐
- javascript格式化数字问题(1234567890 --> 1,234,567,890)
- 将1234567890转换成1,234,567,890每3位用逗号隔开的形式(百度)
- PHP正则表达式:将1234567890转换成1,234,567,890 每3位用逗号隔开的形式
- 如何把1234567890变成1,234,567,890?
- 将1234567890转换成1,234,567,890 每3位用逗号隔开的形式 PHP千分位
- 写一个方法,将一个字符串(1234567890)转换成(1,234,567,890)每三个一组用逗号隔开()
- 将一个字符串(1234567890)转换成(1,234,567,890)每三个一组用逗号隔开
- 将1234567890转换成1,234,567,890 每3位用逗号隔开的形式
- 写一个方法,将一个字符串(1234567890)转换成(1,234,567,890)每三个一组用逗号隔开。 用2种方法。
- php题目将1234567890转化成1,234,567,890每3位用,隔开
- PHP正则表达式:将1234567890转换成1,234,567,890 每3位用逗号隔开的形式
- 将1234567890转换成1,234,567,890 每3位用逗号隔开的形式
- php中将12567890装化为1,234,567,890
- 请实现一个js脚本,要求做到将数字转化为千分位表示如:1234567转化为1,234,567
- 一道笔试题:假设在n进制下,下面的等式成立,n的值是(),567*456=150216.<转载>
- 输入一个字符串“1234567”,返回“1,234,567”
- 透明控件+去除邮票效果——&amp;gt;界面倍儿漂亮的Windows应用软件
- IP address =>CString <=>u_long
- 读<<CLR via C#>>总结(7) 以传引用的方式向方法传递参数---ref&out
- c++ 模板<template class T> c++ 模板<template class T>