String manipulation out of the box solution?
| From: | Merlin | Date: | Tue, 10 May 2005 12:58:27 +0000 |
| Subject: | String manipulation out of the box solution? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-214834@lists.php.net to get a copy of this message | ||
Hi there,
I am writing an internal full text search engine and do have trouble in outputting the text in an apropriate way.
Problem is that if there is more than one word I cant handle the text cropping.
For example:
Search term: php germany
Text from database: There is no such great language than php. Amongh those countries using this language is Germany with a good percentage of users.
Text output should be:
...language than php. Amongh... language is Germay with a good...
Similar to the way google does it. I tried it now with a couple of ways but failed for most (I tried with strpos and substr).
Is there a solution out of the box with php, or maybe anybody knows a good script which does that. This does sound like a standard feature to me.
Thank you for any help,
Merlin