3.6. Function reference
3.6.36. wordWrap()
3.6.35. upper()
« Previous
3.7. Instructions
Next »

3.6.36. wordWrap()

Referencestring wordWrap(string $text, integer $length [, string $break [, boolean $cut ]])

This function works similarly to truncate(), but instead of truncating the text, it tries to break it with $break (<br /> tag by default). If $cut is set to true, the string is always wrapped to the specified width, so if it contains a too long word, it is broken apart.

In the $break argument, you might use the formatting codes: \r, \n, \t and \\ indicating the following characters: carriage return, new line, tabulation, backslash.

Remember that the tag name in $break must be written using entities, if it is specified explicitly in the template.

3.6.36. wordWrap()
3.6. Function reference
« Previous
3.6.35. upper()
Next »
3.7. Instructions