Forum Moderators: coopster
The sting for the title is 100 characters long.
I figured I could search for the end of the string with str_word_count and replace the last three characters, but somehow I couldn't make it work.
Could someone please tell me how to do this?
Sorry for such a bold request, but I only have very basic understanding of PHP/MySQL.
Split the string into an array with explode(" ", $string). Step through the array until the total characters are too long and then step back one. Implode back the right number of words and append the ellipse.
- Ryan