word_limiter($str[, $limit = 100[, $end_char = '…']])
Parameters: |
|
---|---|
Returns: |
Word-limited string |
Return type: |
string |
Truncates a string to the number of words specified. Example:
$string = "Here is a nice text string consisting of eleven words."; $string = word_limiter($string, 4); // Returns: Here is a nice
The third parameter is an optional suffix added to the string. By default it adds an ellipsis.
Please login to continue.