我需要將文本拆分爲兩個部分,該函數可以完成但它在一個單詞中間切斷,我需要它來計算單詞給出的開始或結束或採取幾個字符。在125個字符後將文本字段拆分爲兩部分
因爲我需要的字符範圍不超過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);
感謝
完美,非常感謝! – ConquestXD