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

FlashVar function how to insert variables
Hi guys. Im new in this forum and also new in php programming. Can you help me about this code?
<

Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following O

Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spo

Php - mysql select?
hi, i have this code:

Code: <?php
session_start();
// dBase file
include &quo

making web pages for accounts
Hello, I would like to make pages for accounts on my website im making (its not a real website..im j

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Can anyone give me some link on .htaccess tutorial
i wish to have friendly url using .htaccess, but no idea yet about this

Hope that anyone cou

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