===== Syntax ===== string chunk_split(string $str [, int $length [, string $end]]) //(PHP 4, PHP 5)// ^ $str | The string value to be split into chunks | ^ $length | The maximum length of each piece of string split apart from **$str**. The default value is 76 characters. | ^ $end | The character sequence that denotes the end of each piece (and is appeneded after each chunk). The default sequence is "\r\n" (carriage return followed by a newline). | ^ RETURNS | Returns the modified string with line breaks between each piece | ===== What it Does ===== Unlike the [[explode]] function which breaks apart a string into an array, the **chunk_split** function will reformat the string, inserting a character sequence ("\r\n" by default) after each chunk. Also, chunks are delimitted by string length and not individual characters. ===== Example ===== echo '

chunk_split

'; echo chunk_split($longtext);