RE: [PHP] splitting text solved

2003-06-04 Thread electroteque
search string for mysql full text :D -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] splitting text hi there , i am building a fulltext search engine which will use the mysql boolean se

[PHP] splitting text

2003-06-04 Thread daniel
hi there , i am building a fulltext search engine which will use the mysql boolean search features , although it defaults to OR with words between spaces you have to explictly put a + in front of words so say i typed "some word" word2 ,to get both i have to do +"some word" +word2 how can i split

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
); This should give u the strings in 2 vars. Now u can add anything with $text_a."...Click here ".$text_b Hope i was helpful, Karthik. - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Wednesday, August

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

RE: [PHP] Splitting Text

2001-08-07 Thread Robert V. Zwink
For future reference using explode and counting the words is not the correct way to do this. Your array could be huge, and if you have multiple requests to the page this would be a horrible idea. I believe the correct way to do this is to use MySQL inherent function SUBSTRING_INDEX(str,delim,cou

Re: [PHP] Splitting Text

2001-08-07 Thread Jordan Elver
n Elver [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 06, 2001 5:20 PM > To: PHP General Mailing List > Subject: [PHP] Splitting Text > > > Hi, > Can anyone give some pointers for my problem. > I want to pull articles out of a db and then show the first x number of > words

RE: [PHP] Splitting Text

2001-08-06 Thread Matthew Loff
ginal Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 5:20 PM To: PHP General Mailing List Subject: [PHP] Splitting Text Hi, Can anyone give some pointers for my problem. I want to pull articles out of a db and then show the first x number of words with a rea

RE: [PHP] Splitting Text

2001-08-06 Thread Alfredeen, Johan
General Mailing List Subject: [PHP] Splitting Text Hi, Can anyone give some pointers for my problem. I want to pull articles out of a db and then show the first x number of words with a read more link to the rest of the article. Could someone point me in the right direction. I've seen a

[PHP] Splitting Text

2001-08-06 Thread Jordan Elver
Hi, Can anyone give some pointers for my problem. I want to pull articles out of a db and then show the first x number of words with a read more link to the rest of the article. Could someone point me in the right direction. I've seen a code snippet for this, but now I can't find it :-( TIA,