Search Results substring

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,

I have been searching for some clues as to how to show a substring from a
database search.

$pagetitle = "Page Title";
$pagetext = "This is <b>a typical</b> string that would be stored<br>in the

Search for "that"

results would look like

 1. Page Title
     ...string that would...
 2. Another page
    ...computers that can...
 3. Further Page
   ...languages that are...

At the moment the search results just show the page title.  The idea is that
in the set of results I can show the user the context of each result, a bit
like a search engine does.  Ideall I would like up to 10 words either side
of the search keyword.

BTW php+ mysql


Site Timeline