문제

I'm trying to find a php function that will take a string and a length number, and at that length in the string will cut it, but not if its in the middle of a word, only if its a space, and will check for the nearest space to do so.

It also would continuously do this and return the array of strings with however long the original string was (IE if the original string was about 240 in length and I wanted to cut around 80, the array would be 3 strings large).

I found a couple of functions but none that does that, and I'm having trouble creating my own.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top