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
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
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
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
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
);
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
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
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
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
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
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
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
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,
13 matches
Mail list logo