PHP Case Insensitive Word Replacement
<p>Ok I'm trying to make search terms bold in this search script I'm making, except I can't get it to work case insensitive.</p>

<pre><code>    function highlight($term,$target){
    $terms = explode(" ", $term);

    foreach($terms as $term){
        $result = (eregi_replace($term, "&lt;strong&gt;$term&lt;/strong&gt;", $target));
    }
    return $result;
}
</code></pre>

<p>That is the function I have so far.. It says on PHP.net that eregi_replace is case insensitive matching but it's obviously not working for some reason. (I'm a noob).</p>

<p>Any ideas? :D</p>
