Word Wrap

Wrap text to specified line width.

Code

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

Parameters

Text to wrap

Maximum line width

Server

More PHP Snippets