함수 number format()

Jmnote (토론 | 기여)님의 2018년 8월 16일 (목) 09:47 판 (새 문서: ==PHP== 분류: PHP {{참고|PHP number_format()}} <source lang='php'> <?php $num = 1234.5678; echo number_format($num); # 1,235 echo number_format($num,2); # 1,234.57 echo number...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 PHP

<?php
$num = 1234.5678;
echo number_format($num);
# 1,235
echo number_format($num,2);
# 1,234.57
echo number_format($num,2,'','');
# 123457
echo number_format($num,2,'.','');
# 1234.57
echo number_format($num,6);
# 1,234.567800

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}