|
Posted by Jackson Linux on 10/04/59 11:10
Hi, everyone, I apologise if this posts twice; I'm having issues with
my outgoing email server.
I'm making 'teasers' of the first, say 200 to 250 characters of some
articles. This works great:
$content = strip_tags($article['content']);
$striptease = substr($content, 0, 275);
but cuts off words right in the midd ...
I'd like to find a way to take $content, look at the first 250
characters, then count backwards to the last space and chop it there.
Does anyone have an ideas/scripts for this?
Thanks in advance,
Jack
Navigation:
[Reply to this message]
|