Home » PHP chunk_split() function

PHP chunk_split() function

by Online Tutorials Library

PHP chunk_split() Function

PHP chunk_split() function is used to splits a string into smaller parts or chunks. The function does not alter the original string.


stringString to splitRequired
LengthSpecify the length of the chunks. Default is 76Optional
endSpecify what to place at the end each chunk.Optional

Example 1


Hello ...Tutor...aspire!...  

Example 2


Your string is: Hello  By using 'chunk_split()' function your string is: H.e.l.l.o.  

Next TopicPHP String

You may also like