this is my function whihc currently highlights the matching keywords
function highlight($input, $keyword) {
foreach( $keyword as $word ) {
/// HIGHLIGHT KEYWORD
$output = preg_replace(
"/(>|^)([^<]+)(?=<|$)/esx",
"'\\1' . str_replace('" . $word . "', '<B>" . $word . "</B>', '\\2')",
$input
);
$input = $output;
}
return $output;
}
Can someone show me how to IGNORE the href tags in the link <a href>...</a> tags