Conditional div class doesn't echo, only the variable within does
<p>Is there any reason why this is happening due to the following code? All that gets displayed is the variable , i.e the image. </p>

<pre><code>&lt;?php $featured_image = the_post_thumbnail();?&gt;
    &lt;?php if (is_page(7) || is_page(12))
        echo '&lt;div class="featured_image"&gt;' . $featured_image . '&lt;/div&gt;'
    ?&gt;
</code></pre>
