Thanks for chipping in killer7k but I think you missed the question or perhaps I didn't post it well enough. I want to return search results similar to most search engines where they show you a snipet of information of what comes before and after your search terms.
For example, let's say that I search the web for "Chuck Norris". One of the search results might be a URL to his biography on IMDB. And below the link they will show a preview of what they found on the web page. That preview might look like this:
How would I (in PHP or MySQL) return x number of words before and x number of words after the search term "Chuck Norris"Chuck Norris
Mini Biography: Chuck Norris is an Executive Producer of "Walker, Texas Ranger" (1993) as well as the star... more ...
www.imdb.com/name/nm0001569




Reply With Quote