htmlwrap()
functionstring htmlwrap ( string str [, int width [, string break [, string nobreak]]])
htmlwrap()
is a function which wraps HTML by breaking long words and preventing them from damaging your layout.
This function will NOT insert <br> tags every "width" characters as in the PHP wordwrap()
function.
HTML wraps automatically, so this function only ensures wrapping at $width
characters is possible.
Use in places where a page will accept user input in order to create HTML output like in forums or blog comments.
This function will not insert line breaks within HTML tags or HTML entities such as .
It treats all HTML entities as single characters, when taking them into account for string length.
It will also attempt to find logical line-break insertion points (like after periods or slashes) before inserting breaks at $width
characters.