highlighting search terms


Posted on 16th Feb 2014 07:03 pm by admin

well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm trying to take individual search terms that are being $_POSTed and highlighting them in the search results.

The Original Post talked about using str_replace to handle this. New problem, though, when the same search terms show up inside a HTML tag (like <img src="search_term">).

I'm trying "/b(?!<.+?>)search_termb/" -- but it's still finding "search_term" inside <img src="search_term">.

No comments posted yet

Your Answer:

Login to answer
69 Like 30 Dislike
Previous forums Next forums
Other forums

Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any do

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Refining of search Criteria
Dear Friends

I need a help, I have a search page which of cars related, which has different s

Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

please fix the error
What is the error in the below code ???
Line number On/Off | Expand/Contract <?php

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

Email "$"
Hello!!

Any PHP guy with a bit of a knowledge in Flash ?

When I send a JPEG from flash

Looping Problem
I've got a client that has a database with about 200 events at any given time. I'm trying to loop t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash