php 한글 문자열 정렬해보기 - 숫자포함
페이지 정보
작성자
본문
숫자를 포함시켜서 한글을 정렬 하는 방법 이다.
function koreanStrSort($str) {
$arr = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
sort($arr);
return implode('', $arr);
}
$str = '대한민국16강진출';
echo koreanStrSort($str);
----- Output -----
16강대국민진출한
댓글목록
등록된 댓글이 없습니다.