[英]How to count characters including white space and then break onto a new line after a certain length using PHP
如何计算包括空格在内的字符,然后在一定长度后中断,例如,如何使用PHP将25个字符后的字符串中断到新行上?
Try chunk_split () if you don't mind cutting words in half. 如果您不介意将单词切成两半,请尝试chunk_split ()。 It treats whitespace as any other char.
它将空格与其他任何char一样对待。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.