How can I select the first 400 characters out of a text string including spaces?
http://php.net/substr
the string is a document, is there a way to select the first 400 characters but the last be a whole word. What I should do is select the first 400 chrs but stop the count in a space...how can I do that?
Use substr to get the first 400 chars, then use strrpos to find the last space, and use substr again to get the chars up to that space.
Diego