piadream

맨 앞글자만 크게 써먹게 하기.(네이트 뉴스 서비스 사용하다 보면 이해함)

 <?php

$string="hello string by php source example";

$split=explode(" ", $string);

$explode_string=$split[0]; 여기에 echo문으로 해줘도 나오던걸로 .. 그러나 좀더 보강 Lock을 위해 아랫 구문 두줄더.(개인적)

$str_count=mb_strlen($explode_string,"UTF-8");

$print_str=mb_substr($string, 0, $str_count, 'utf-8');

?>

|

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고