string TruncateText( string text, int max_length )
The function TruncateText truncates the specified string to the maximum length of max_length. If a string is truncated, ellipsis are added.
Parameter | Description |
---|---|
text | Source string. |
max_length | Maximum length of the target string. |
<? $str = "1234567890"; echo TruncateText($str, 7); // prints "1234567..." ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |