Re: [PHP] splitting text after 25 words

2001-08-08 Thread jose d lopez
someting i've used. At 03:57 PM 8/8/2001 +1100, Justin French wrote: >Hi all, > >I'd like to split a text block at 25 words, as a teaser for the full >article. Now I know how to split at a certain character, but i don't >want a half word or anything, so I want (i guess) to hunt for the 25th

RE: [PHP] splitting text after 25 words

2001-08-08 Thread Robert V. Zwink
7;.', -2); -> 'mysql.com' This function is multi-byte safe. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hope this helps! Robert V. Zwink DAID Development LLC http://www.zwink.net/daid.php -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Wednes

Re: [PHP] splitting text after 25 words

2001-08-08 Thread Justin French
Thanks to all who replied, this solution by Chris was bar far the easiest to implement. Really appreciate it :) Chris Lambert wrote: > $teaser = explode(" ", $article, 26)); > array_pop($teaser); > $teaser = implode(" ", $teaser); Justin French -- PHP General Mailing List (http://www.php.n

Re: [PHP] splitting text after 25 words

2001-08-07 Thread karthik
08, 2001 10:27 AM Subject: [PHP] splitting text after 25 words > Hi all, > > I'd like to split a text block at 25 words, as a teaser for the full > article. Now I know how to split at a certain character, but i don't > want a half word or anything, so I want (i guess) to h

Re: [PHP] splitting text after 25 words

2001-08-07 Thread Chris Lambert
ch <[EMAIL PROTECTED]> To: php <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 12:57 AM Subject: [PHP] splitting text after 25 words | Hi all, | | I'd like to split a text block at 25 words, as a teaser for the full | article. Now I know how to split at a certain characte

[PHP] splitting text after 25 words

2001-08-07 Thread Justin French
Hi all, I'd like to split a text block at 25 words, as a teaser for the full article. Now I know how to split at a certain character, but i don't want a half word or anything, so I want (i guess) to hunt for the 25th occurence of " " (a space), and split $text into two new variables, $text_a