3자리 콤마
본문
<?php echo$list[$i][wr_27] //급여사항 ?>
이 코드에 3자리 콤마가 들어가게 하려면
어떻게 수정해야 하나요?
고수님들 부탁드립니다
답변 2
참조하세요 https://stackoverflow.com/questions/6308687/php-number-format#:~:text=If%20you%20want%20numbers%20like,%2C%22%2C%20%22.%22)%3B
<?php echo number_format($list[$i]['wr_27']); //급여사항 ?>
+ number_format()
- https://www.php.net/manual/en/function.number-format.php
+ Instruction separation (명령 구분) ... 질문의 경우 ; 생략 가능하긴 하지만...
- https://www.php.net/manual/en/language.basic-syntax.instruction-separation.php
- http://docs.php.net/manual/kr/language.basic-syntax.instruction-separation.php
+ 주의! 'wr_27'처럼 지정해주지 않으면 오류입니다.
PHP v7.2 미만 ... Notice: Use of undefined constant ...
PHP v7.2 이상 ... Warning: Use of undefined constant ...
PHP v8.0 이상 ... Fatal error: Uncaught Error: Undefined constant ...
!-->
답변을 작성하시기 전에 로그인 해주세요.