Javatpoint Logo
Javatpoint Logo

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.


Parameter Description Required/Optional
string String to split Required
Length Specify the length of the chunks. Default is 76 Optional
end Specify what to place at the end each chunk. Optional

Example 1


Hello ...javatp...oint!...

Example 2


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

Next TopicPHP String

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA