Wrap Text

Wrap text at a specified character width.

Code

General
wordwrap($str, $width, "\n", false);

Parameters

The text to wrap

Maximum line width

Server

More PHP Snippets