- #数字保留两位小数
- $n = sprintf("%1.2f", $n);
- //方法二
- $n = number_format($n, 2, '.', '');
- //UTF8转GBK
- $v = iconv("UTF-8", "GBK", $v);
- //GBK转UTF8
- $str = iconv("GBK", "UTF-8", $str);
- //该片段来自于http://www.codesnippet.cn/detail/0708201513375.html
来源: http://www.codesnippet.cn/detail/0708201513375.html