#数字保留两位小数$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);
#数字保留两位小数 $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);