mb_strimwidth
(PHP 4 >= 4.0.6, PHP 5)
mb_strimwidth -- Get truncated string with specified width
 
Description
string mb_strimwidth ( string str, int start, int width, string trimmarker [, string encoding])


mb_strimwidth() truncates string str to specified width. It returns truncated string.
If trimmarker is set, trimmarker is appended to return value.
start is start position offset. Number of characters from the beginning of string. (First character is 0)
trimmarker is string that is added to the end of string when string is truncated.
encoding is character encoding. If it is omitted, internal encoding is used.

사용 : string mb_strimwidth ( string str, int start, int width, string trimmarker [, string encoding])

<?php
$str = "article test abcdefg..";
$str = mb_strimwidth($str, 0, 8, "...");

echo $str;
?>
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by Nuki

블로그 이미지
가족여행, 육아일기, 온라인 마케팅, 웹 프로그램, IT 트렌드
Nuki

공지사항

Yesterday50
Today0
Total326,943

달력

 « |  » 2012.05
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

최근에 받은 트랙백

글 보관함