RE: Newbie Question: breaking a substr() string on a space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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.....

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux