function to replace strings except images with alt need to be adjust
<p>i have my own SEO function it used to replace a word in string to clickable link this is the function</p>

<pre><code>function myseo($t){
    $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    $a = array('computer','films', 'playstation');
    $uu = count($a);
    $theseotext = $t;
    for ($i = 0; $i &lt; $uu; $i++) {
        $theseotext = str_replace($a[$i], '&lt;a href="'.$url.'" title="'.$a[$i].'"&gt;'.$a[$i].'&lt;/a&gt;', $theseotext);
    }
    return $theseotext;
}
</code></pre>

<p>it's working great with strings but when there is an image inside the string and this image have ALT="" or somtime TITLE="" the code got error and the images not showing.</p>

<p>this image before do the seo function: </p>

<pre><code>&lt;img src="mypic.jpg" alt="this is my computer pic" title="this is my computer pic" /&gt;
</code></pre>

<p>the image after do the seo function</p>

<pre><code>&lt;img src="mypic.jpg" alt="this is my &lt;a href="index.php" title="computer"&gt;computer&lt;/a&gt; pic" title="this is my &lt;a href="index.php" title="computer"&gt;computer&lt;/a&gt;pic" /&gt;
</code></pre>

<p>is there any way to let the code do not replace the word if it inside the TITLE or the ALT.</p>
