我是靠谱客的博主 苹果音响,最近开发中收集的这篇文章主要介绍PHP的chunk_split() 函数把字符串分割为一连串更小的部分,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

chunk_split() 函数把字符串分割为一连串更小的部分。
chunk_split(string,length,end)
string必需。规定要分割的字符串。
length可选。数字值,定义字符串块的长度。默认是 76。
end可选。字符串值,定义在每个字符串块末端放置的内容。默认是 rn。
<?php
echo chunk_split("Shanghai",2,".");
Sh.an.gh.ai.
iVBORw0KGgoAAAANSUhEUgAAAUAAAAFACAIAAABC8jL9AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAG
VklEQVR4nO3cQXLjOBAAQWtj//9l72GuGxRHhOEuMvPqCAmkWDIOLby+v7+/gKZ/fnsBwOcEDGEC
hjABQ5iAIUzAECZgCBMwhAkYwv49/vPr9dqzjpmWjKltvodv13xyPdte54wnP4fHN9B/YAgTMIQJ
GMIEDGEChjABQ5iAIUzAECZgCBMwhAkYwt7MQpMzbWz4zHocjfqxNQHnPoCdT/mqmzOtzDPXNe2H
HNNcvz+20BAmYAgTMIQJGMIEDGEChjABQ5iAIUzAECZgCNs0C/3kkbppI5BPdr/n0I8Z7mbVgewk
2EJDmIAhTMAQJmAIEzCECRjCBAxhAoYwAUOYgCHMKOUlxhL5XQLewXwyP8QWGsIEDGEChjABQ5iA
IUzAECZgCBMwhAkYwgQMYUYp72bbVKbxzwkEXLJqpnrUwfdcYQsNYQKGMAFDmIAhTMAQJmAIEzCE
CRjCBAxhAoYwo5Q7TBsbnrYePrYp4LsO3565rp21bF5P7mPNLfgtW2gIEzCECRjCBAxhAoYwAUOY
gCFMwBAmYAgTMIStGaV87GzttAuPrmfVhOO0y9/Ajxl2WHWe8yrT1sPHbKEhTMAQJmAIEzCECRjC
BAxhAoYwAUOYgCFMwBBmlHKHu04m3vW6Ql73Oyl3mp0D/QPf6wwP4cdsoSFMwBAmYAgTMIQJGMIE
DGEChjABQ5iAIUzAEPZmFro4LjftiNaTziy7+F6jFJ/nY/4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ABQ5iAIUzAEGaU8m5Mbu6x7T4fj+sKuGTV2dGr
LBnot+YrbKEhTMAQJmAIEzCECRjCBAxhAoYwAUOYgCFMwBBmlJJnCZ35fIaAf9zOp+HG51RPmwM/
Y8OabaEhTMAQJmAIEzCECRjCBAxhAoYwAUOYgCFMwBBmlPKSheN7Nzvu9I+F65l2aWdsWPOmgEPT
4fwxaoT7ZAm3nJc+ZgsNYQKGMAFDmIAhTMAQJmAIEzCECRjCBAxhAoaw1/Ek18DRs52Ko3mr3HI2
u+j4g/Bjhh0e+0Ww8JzqafdwyBecLTSECRjCBAxhAoYwAUOYgCFMwBAmYAgTMIQJGMLezEIDk/kP
DGEChjABQ5iAIUzAECZgCBMwhAkYwgQMYf8BoRGd+xvMhVQAAAAASUVORK5CYII=

 

最后

以上就是苹果音响为你收集整理的PHP的chunk_split() 函数把字符串分割为一连串更小的部分的全部内容,希望文章能够帮你解决PHP的chunk_split() 函数把字符串分割为一连串更小的部分所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(35)

评论列表共有 0 条评论

立即
投稿
返回
顶部