UTF-8 기준, 한글을 초성,중성,종성으로 분리하기
= 44032 && $code 출처 : http://blog.arzz.com/192// 추가내용$str = iconv('euc-kr','utf-8',$string); $string = GetUtf8String($str);$firstword = ord( substr( $string, 0, 1 ) ); if (127 > $firstword) { $string = substr($string, 0, 1); }else { if(227 == $firstword) { $string = iconv('utf-8','euc-kr',$string); } $string = substr($string, 0, 2); }// 맨 앞글자의 초성만 가져온다.
더보기