답변 1개
채택된 답변
+20 포인트
2년 전
</p>
<pre>
function number2hangul($number){
$num = array('', '일', '이', '삼', '사', '오', '육', '칠', '팔', '구');
$unit4 = array('', '만', '억', '조', '경');
$unit1 = array('', '십', '백', '천');
$res = array();
$number = str_replace(',','',$number);
$split4 = str_split(strrev((string)$number),4);
for($i=0;$i<count($split4);$i++){
$temp = array();
$split1 = str_split((string)$split4[$i], 1);
for($j=0;$j<count($split1);$j++){
$u = (int)$split1[$j];
if($u > 0) $temp[] = $u.$unit1[$j];
}
if(count($temp) > 0) $res[] = implode('', array_reverse($temp)).$unit4[$i];
}
return implode('', array_reverse($res));
}
echo number2hangul(350000000 ); //3억5천만</pre>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
2년 전
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
채택
답변대기
답변대기
답변대기
답변대기
채택
채택
답변대기
답변대기
답변대기
채택
아주 잘되네요~~
그런데~~오류도 없는데~~페이지 상단에 카카오맵이 사라져버리네요~~