![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||
wordwrap(PHP 4 >= 4.0.2, PHP 5) wordwrap -- Wraps a string to a given number of characters using a string break characterDescriptionstring wordwrap ( string str [, int width [, string break [, bool cut]]] )Returns a string with str wrapped at the column number specified by the optional width parameter. The line is broken using the (optional) break parameter. wordwrap() will automatically wrap at column 75 and break using '\n' (newline) if width or break are not given. If the cut is set to 1, the string is always wrapped at the specified width. So if you have a word that is larger than the given width, it is broken apart. (See second example).
See also nl2br() and chunk_split(). Copyright © 1997 - 2007 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. A copy of the Open Publication License is distributed with this manual, the latest version is presently available at http://www.opencontent.org/openpub/. Please see full copyright text at http://www.php.net/manual/en/copyright.php Original version of the above documentation is available at http://www.php.net/manual/en/ |
|