note 14913 deleted from function.chunk-split by jimw

From: Date: Wed, 02 Jan 2002 12:27:04 +0000
Subject: note 14913 deleted from function.chunk-split by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24282@lists.php.net to get a copy of this message
"\n" character (CR LF etc.) forces chunk_split to split string on this character. For example: I need to split a long string into chunks of 255 chars length. But I heed it to split a string by no more than 3 chunks. The string is "Sometext1 Sometext2\nSometext3". Whole string length has not exceeded 255 chars, but you get a result array of two elements: "Sometext1 Sometext2" and "Sometext3". Anyway in the case if given chunks limit is smaller than number of CRLF's in the source string, chunk_split() do it correctly, it don't split on first exceeding CRLFs.

« previous php.notes (#24282) next »