I am made a simple web site search function. I use MySql 4 and have a table that contains all text on a web site in a column type text.
I can search it, but I want to make the search term bold when I print out the text field content.
select page_data from table1 where page_data like '%$search_term%';
while($row=mysql_fetch_array($result)) {
$data = $row['page_data'];
print $data;
}
$ data now contains all the text on that web site which has a referance to the search term.
Is there a way to say something like:
if $search_term is located in $data make it bold?
future thanks
tom