数字を3桁でカンマ区切りに

テキスト処理文字列

カンマ区切り

 閲覧数:1801  投稿日:2013-06-15  更新日:2013-06-15  

数字を3桁でカンマ区切りに


コード

$a = 10000000;
$b = number_format($a);
echo $b;



結果

10,000,000



タグ


number_format 



指定文字列を削除

文字列の先頭に0があった場合に、取り除く