1 개요[ | ]
- PHP number_format()
PHP
CPU
0.0s
MEM
21M
0.1s
Copy
$num = 1234.5678;
echo number_format($num) ."\n"; # 1,235
echo number_format($num,2) ."\n"; # 1,234.57
echo number_format($num,2,'','') ."\n"; # 123457
echo number_format($num,2,'.','') ."\n"; # 1234.57
echo number_format($num,6) ."\n"; # 1,234.567800
1,235 1,234.57 123457 1234.57 1,234.567800
2 같이 보기[ | ]
- PHP money_format()
- PHP sprinf()
- PHP prinf()
- PHP sscanf()
- PHP round()
- 함수 round()
- 함수 toFixed()
- 함수 thousand_format()
- 함수 number_format()
3 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.