php chunk_split () function syntax

php chunk_split () function syntax

Role: the string is divided into a series of smaller parts. Dongguan marble slab

Syntax: chunk_split (String, length, End)

parameter:

parameter description
string essential. Specifies the string to be split.
length Optional. Digital value, defining the length of the string block. The default is 76.
end Optional. String value defined in the string is placed in each end of the block content. The default is \ r \ n.

Description: chunk_split function string is divided into a series of smaller pieces (). This function does not change the original string.

php chunk_split () function examples

<?php
$str = "Hello php.cn!";
echo chunk_split($str,3,"..."); 
?>


Output:

Hel ... what ... php .... cn ...! ...

Guess you like

Origin www.cnblogs.com/furuihua/p/11888971.html