1 //数字保留两位小数 2 $n = sprintf("%1.2f", $n); 3 //方法二 4 $n = number_format($n, 2, ‘.‘, ‘‘); 5 6 //UTF8转GBK 7 iconv("UTF-8", "GBK", $v); iconv("GBK","UTF-8",$v);
时间: 2024-10-06 00:54:05
1 //数字保留两位小数 2 $n = sprintf("%1.2f", $n); 3 //方法二 4 $n = number_format($n, 2, ‘.‘, ‘‘); 5 6 //UTF8转GBK 7 iconv("UTF-8", "GBK", $v); iconv("GBK","UTF-8",$v);