@H_404_2@
$county = MysqL_query("SELECT COUNT(id) from table where type = 'application'");
$county = MysqL_result($county,0);
$applications = ''.$county.'';
这给我的结果像1156563.但我希望看到它像1,156,563逗号.我怎样才能做到这一点?
最佳答案
number_format()
应该是你需要的@H_404_2@
@H_404_2@
If only one parameter is given,number
will be formatted without decimals,
but with a comma (“,”) between every
group of thousands.@H_404_2@
PHP
echo number_format(23124154);
//output: 23,124,154