Monday, September 15, 2008

The chunk_split() function

This function split a string into smaller strings.

Syntax: chunk_split(string,length,seperator);

length – the number of characters each smaller strings should contain.
seperator – this character will be inserted after every smaller string.
Example inputs:
$str1="A simple PHP Program";
echo chunk_split($str1,2,"@");

No comments: