Assign variables and display results
<pre><code>    &lt;?php 
$somevariable = echo $anothervar;
?&gt;
</code></pre>

<p>i get a T_ECHO unexpected error . what is the right way of accomplishing the above task?</p>

<p>I am extending this question a little bit :</p>

<pre><code>&lt;?php
    $num_posts = get_option($shortname.'_num_posts');
     $args = array(
            'posts_per_page' =&gt; $num_posts,
            'post_type' =&gt; 'post'
                   );
?&gt;
</code></pre>

<p>This is a bit of wordpress code . The *get_option* function doesn't echo the value , so i tried</p>

<pre><code>&lt;?php
    $num_posts = echo get_option($shortname.'_num_posts');
     $args = array(
            'posts_per_page' =&gt; $num_posts,
            'post_type' =&gt; 'post'
                   );
?&gt;
</code></pre>

<p>and i messed it . what is the right way to do it ?</p>
