Re: PREG_MATCH and arrays
- From: Michael Fesser <netizen@xxxxxx>
- Date: Wed, 02 Jan 2008 23:29:17 +0100
..oO(Rik Wasmus)
On Wed, 02 Jan 2008 23:00:05 +0100, Michael Fesser <netizen@xxxxxx> wrote:
$keywords = implode('|', $filter_title);
foreach ($filter_test as $title) {
if (preg_match("/\b$keywords\b/i", $title)) {
// match
} else {
// no match
}
}
Or something like that.
One could do that, I'd advise top use a preg_quote() on the values though.
Good point.
Micha
.
- References:
- PREG_MATCH and arrays
- From: Poster
- Re: PREG_MATCH and arrays
- From: Rik Wasmus
- Re: PREG_MATCH and arrays
- From: Poster
- Re: PREG_MATCH and arrays
- From: Michael Fesser
- Re: PREG_MATCH and arrays
- From: Rik Wasmus
- PREG_MATCH and arrays
- Prev by Date: Re: PREG_MATCH and arrays
- Next by Date: Re: deleting cookies and local browser time versus server time
- Previous by thread: Re: PREG_MATCH and arrays
- Next by thread: Re: PREG_MATCH and arrays
- Index(es):