PHP str_split () function
Definition and Usage
str_split () function to split a string into an array.
grammar
str_split( string,length )
参数 | 描述 |
---|---|
string | 必需。规定要分割的字符串。 |
length | 可选。规定每个数组元素的长度。默认是 1。 |
technical details
return value: | If the length is less than 1, str_split () function returns FALSE. If the length is greater than the length of the string, the entire string is returned as the only element of the array. |
---|---|
PHP version: | 5+ |
More examples
PHP String Reference