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

Send current URL in URL with a $_GET variable problem.
Hello community,

I have created a function that gets the current variable of a page, example:

Slashes
Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and i

Get ID from Database when Posting with a HTML Form
I have a form I am submitting to a MySql database. Each product has an ID # attached to it that auto

RSS feed - FeedList for WordPress
Hi,

I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

php calculate
this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNum

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

list files from folder, only one for each date
I have many files in a folder and wish to only list one of each date

these are the file names

Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does an

Calling strings from other php class
I have test1.php{
$string1;
$string2;
....
... //10 strings in this class <

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