English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String String Function Manual
The chunk_split() function is used to split the string into small pieces
string chunk_split( string $body[, int $chunklen = 76 [, string $end = "\r\n"] )
It is used to split the string into smaller blocks
It returns the split string
Number | Parameters and Description |
---|---|
1 | body Character to be Split |
2 | chunklen Split Size |
3 | end End of Line Sequence Symbol. |
Try the following example, split w3codebox split the string after each character and add "." after each split
<?php //Split w3codebox split the string into individual characters and add "." after each split $str = "w3 echo chunk_split($str,1,"."); ?>Test and See‹/›
Output Result
n.h.o.o.o.