PHP Programing language

chunk_split() Functions in PHP
Previous Home Next

chunk_split()

The chunk_split() function splits a string into a series of smaller parts.

Syntax:
chunk_split(string,length,end)

"string" specifies the string to split, "length" defines the length of the chunks. Default length of chunk is 76. and "end" defines what to place at the end of each chunk. Default is \r\n

Example:

<?php
$str = "Gud Morning!";
echo chunk_split($str,1,".");
?>

Output:

G.u.d. .M.o.r.n.i.n.g.!.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: