Php 如何在计数的数字中加逗号?
嘿huys我在数我的桌子Php 如何在计数的数字中加逗号?,php,mysql,count,Php,Mysql,Count,嘿huys我在数我的桌子 $county = mysql_query("SELECT COUNT(id) from table where type = 'application'"); $county = mysql_result($county, 0); $applications = ''.$county.''; 这给我的结果是1156563。但我想看到它像1156563一样带逗号。我该怎么做呢?应该是您需要的 如果只给出一个参数,则编号为 将被格式化为不带小数, 但在每个 成千上万的人
$county = mysql_query("SELECT COUNT(id) from table where type = 'application'");
$county = mysql_result($county, 0);
$applications = ''.$county.'';
这给我的结果是1156563。但我想看到它像1156563一样带逗号。我该怎么做呢?应该是您需要的
如果只给出一个参数,则编号为
将被格式化为不带小数,
但在每个
成千上万的人
<?php
echo number_format(23124154);
//output: 23,124,154