PHP ' inside " inside '
<p>I have some code to display a thumbnail on hover over an image.</p>

<pre><code>&lt;div onmouseover="document.getElementById('logo').style.display='block';" 
     onmouseout="document.getElementById('logo').style.display='none';"&gt;
    &lt;img src = "img.jpg"/&gt;                                          
&lt;/div&gt;
</code></pre>

<p>This time I want to choose the image to display instead of the static "img.jpg", which will be stored in variable $filename and then I want to append that to another jquery variable $result:</p>

<p>I tried this but there's confusion with single quotes:</p>

<pre><code>$result.= '
           &lt;div onmouseover="document.getElementById('logo').style.display='block';" 
            onmouseout="document.getElementById('logo').style.display='none';"&gt;
               &lt;img  src = "images/' . $filename.'"/&gt;                                         
           &lt;/div&gt;
';
</code></pre>

<p>The confusion arises with single quotes around 'logo', 'block' and 'none'. How do I include single quotes in such situation?</p>
