Re: Php search results
| From: | Alex | Date: | Fri, 22 Nov 2002 01:46:57 +0000 |
| Subject: | Re: Php search results | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125660@lists.php.net to get a copy of this message | ||
you could also use regular expressions, but php isn't perl, so good luck on
that one :p.
"Philip Hallstrom" <philip@adhesivemedia.com> wrote in message
news:20021121141414.L71343-100000@cypress.adhesivemedia.com...
> You could use strstr() to find the index location of the
> string searched for in FIELD. Then use substr() to return say 50
> characters on either side...
>
> -philip
>
> On Thu, 21 Nov 2002, Daniel Masson wrote:
>
> > Hello everyone ...
> >
> > Im working on some kind of search engine for two little tables on text
> > fields on mssql, and the text fields can be very large fields, im doing
> > the search with SELECT FIELD FROM TABLE WHERE FIELD LIKE '%SOMTHING%' ..
> > My question is:
> >
> > When displaying the search results i dont want to display the entire
> > field, only the specific parts where the keyword was found , and bold
> > for the keyword and i just dony know how to to do that, i mean
> > displaying the keyword in bold is no problem .. I need to know how to
> > display only the parts where this keyword is.
> >
> > Any help will be very helpful
> >
> > Thanks every1
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>