I'm working on a project using an XML feed and PHP.
I'm able to grab the stories from the XML but I have an issue with the length - at 255 characters, they're still too long for what I need.
I need to be able to take the existing variable, read it into a new variable and stop at the next blank space after I've reached the number of characters I've specified.
So, for example, I'd read in 155 characters. After 155 characters, it'd finish off the current word and stop at the next blank space. I have to seek the next empty space because I can't cut it off mid-word.
Any thoughts? I'm stumped.