PHP » PYTHON |
login |
register |
about
|
import textwrap result = textwrap.wrap(text, width) wordwrap(PHP 4 >= 4.0.2, PHP 5) wordwrap — Wraps a string to a given number of characters Description
string wordwrap
( string $str
[, int $width= 75
[, string $break= "\n"
[, bool $cut= false
]]] )
Wraps a string to a given number of characters using a string break character. Parameters
Return ValuesReturns the given string wrapped at the specified column. Changelog
Examples
Example #1 wordwrap() example
<?php The above example will output: The quick brown fox<br /> jumped over the lazy<br /> dog.
Example #2 wordwrap() example
<?php The above example will output: A very long wooooooo ooooord.
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|