RE: [PHP] Newbie Question: breaking a substr() string on a space
| From: | Jay Blanchard | Date: | Fri, 11 Mar 2005 15:28:16 +0000 |
| Subject: | RE: [PHP] Newbie Question: breaking a substr() string on a space | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-210505@lists.php.net to get a copy of this message | ||
[snip]
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 ...
[/snip]
http://www.php.net/explode you can use to get individual
words.....