小白教程
所有教程
关于
Search
172.69.58.117
172.69.58.117
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Func string str split”的源代码
本页内容
上一节:
Func_string_str_shuffle
下一节:
Func_string_str_word_count
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:str_split()}}[[分类:PHP字符串函数参考手册|59]] = PHP str_split() 函数 = [[:分类:PHP字符串函数参考手册]] 把字符串 "Hello" 分割到数组中: <sample title="" desc="" lang="php" hererun="1"> <?php print_r(str_split("Hello")); ?> </sample> == 定义和用法 == str_split() 函数把字符串分割到数组中。 == 语法 == <pre> str_split(string,length) </pre> {| class="table table-striped table-hover" ! 参数 ! 描述 |- | string | 必需。规定要分割的字符串。 |- | length | 可选。规定每个数组元素的长度。默认是 1。 |} == 技术细节 == {| class="table table-striped table-hover" | 返回值: | 如果 length 小于 1,str_split() 函数将返回 FALSE。 '''''' 如果 length 大于字符串的长度,整个字符串将作为数组的唯一元素返回。 |- | PHP 版本: | 5+ |} == 更多实例 == == 实例 1 == 使用 length 参数: <sample title="" desc="" lang="php" hererun="1"> <?php print_r(str_split("Hello",3)); ?> </sample> [[:分类:PHP字符串函数参考手册]]
返回至“
Func string str split
”。
上一节:
Func_string_str_shuffle
下一节:
Func_string_str_word_count