smarty variable modifier - wordwrap

PHP/functions 2009/02/23 18:06
원문링크:
http://www.smarty.net/manual/en/language.modifier.wordwrap.php

스마티(smarty)의 wordwrap

PHP 의 wordwrap 함수와 같다.
http://www.php.net/manual/en/function.wordwrap.php
예.

<?php

$smarty
->assign('articleTitle'
,
               
"Blind woman gets new kidney from dad she hasn't seen in years."
               
);
?>



{$articleTitle}
{$articleTitle|wordwrap:30}
{$articleTitle|wordwrap:20}
{$articleTitle|wordwrap:30:"<br />\n"}
{$articleTitle|wordwrap:26:"\n":true}

파라미터 설명.
first parameter       : wordwrap 할 컬럼 수 (integer)
second parameter : wordwrap 에 사용되는 문자열
third parameter      :  wordwrap 을 단어 단위로 할지(FALSE) , 엄격하게 캐릭터수로 할지 (TRUE)를 정함.

'PHP > functions' 카테고리의 다른 글

smarty variable modifier - wordwrap  (0) 2009/02/23
[PHP] 생일로 나이 계산  (2) 2008/09/26
PHP 디렉토리 함수 (dir)  (0) 2008/05/07
tags : , ,
Trackback 0 : Comment 0
◀ PREV : [1] : ... [31] : [32] : [33] : [34] : [35] : [36] : [37] : [38] : [39] : ... [266] : NEXT ▶