【发布时间】:2012-03-27 17:28:25
【问题描述】:
我正在寻找最快的解决方案,将split 一个字符串分成几部分,而不需要word-wrap。
$strText = "The quick brown fox jumps over the lazy dog";
$arrSplit = str_split($strText, 12);
// result: array("The quick br","own fox jump","s over the l","azy dog");
// better: array("The quick","brown fox","jumps over the","lazy dog");
【问题讨论】:
标签: split word-wrap php string split word-wrap