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

2005-03-11 Thread Jay Blanchard
[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);

Re: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread John Nichel
Jackson Linux wrote: 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 =

Re: [PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Richard Lynch
Hi, everyone, I'm '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

Re: [PHP] Newbie Question: breaking a substr() string on a space SOLVED

2005-03-11 Thread Jackson Linux
Hi, everyone, Thanks for the great suggestions! I've looked at all and found that the one here: http://www.php.net/explode that Jay recommended was the easiest for me to wrap my brain around. I wll tinker with the other ones as well - it's all really interesting. The function was: function