我需要将文本分成此函数所做的两部分,但它会在单词中间中断,我需要它来计算单词的开头或结尾,给或取几个字符。
我不能基于字数,因为我需要字符范围不超过 130 个字符。
$str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum"
$first125 = substr($str, 0, 125);
$theRest = substr($str, 125);
谢谢