Date: 06/04/05 (PHP Community) Keywords: no keywords
does anyone have any ideas on using the substr() (or some similar) function, but avoiding fragmenting words? if you do:$string = "jonathan's craving peanutbutter sandwiches";$string = substr($string, 0, 20);you get $string == "jonathan's craving pe"what i'd like to end up with is just "jonathan's craving"
Source: http://www.livejournal.com/community/php/304348.html