Entry
How do you insert a word-wrap of 80char into a string?
Aug 31st, 2000 19:22
Chris Kings-Lynne, mike gifford, unknown unknown, http://www.php.net/manual/function.wordwrap.php
string wordwrap (string str [, int width [, string break]])
Wraps the string str 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.
Example 1. wordwrap() example
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );
echo "$newtext\n";
This appeared in PHP 4.0.2...
Chris