chunk_split() in php
the chunk_split() function splits a string into a series of smaller parts
Note
This function does not alter the original string
syntax
chunk_split(string,length,end)
Example
Output
h.e.l.l.o. .i.n.d.i.a.
the chunk_split() function splits a string into a series of smaller parts
Note
This function does not alter the original string
syntax
chunk_split(string,length,end)
Example
<?php $str="hello india"; // we will split the string after each character and add a"." after each split echo chunk_split($str,1,'.'); ?> |
Output
h.e.l.l.o. .i.n.d.i.a.
0 comments:
Post a Comment