PHP chunk_split Function
What is chunk_split Function?
Explanation
In PHP, this function is used to split a string into smaller chunks.
Syntax:
chunk_split(str,len,end)
In the above syntax "str" specifies the string to be split,"len" specifies the length of the chunks, default is 76,"end" specifies the character to be placed on the end of each chunk.
Example :
<?php
$str= "How are you!";
echo chunk_split($str,3,"*");
?>
Result :
How*are*you*!
In the above example the string is split into chunks of 3 characters,with "*" as the character to be placed at the end of each chunk.