This is what I'm doing. $newspost is the string, and $searchnews is the string being replaced.
if($_POST['hilite'] == 'on' && $searchnews !== '') { $newspost = str_ireplace($searchnews, '<div id="highlight">' . $searchnews . '</div>', $newspost); } echo $newspost;
The only thing I've set for #highlight is "background-color: #605555"...
Also, is there any way to make sure that the replacement isn't made inside, for instance, a div tag?
Edited by DeathRay2K, 27 January 2006 - 03:34 AM.