set a particular option in a select box using jquery
<p>I'm unable to perform the desired event.</p>

<pre><code>  &lt;?php
    include_once 'includes/db.php';
        $result = mysql_query('SELECT country,code FROM countries') or die(mysql_error());

        echo '&lt;select id="CountryCode"&gt;';
        echo '&lt;option value="Select"&gt;Select&lt;/option&gt;';
        while ($row = mysql_fetch_array($result))
        {
           echo '&lt;option value=$row["country"]&gt;'.$row['country'].'&lt;/option&gt;';
        }
        echo '&lt;option value="Other"&gt;Other&lt;/option&gt;';
        echo '&lt;/select&gt;';
    ?&gt;
&lt;input id="country" type="hidden" value="IN"/&gt;
&lt;script&gt;
$(function() 
{
$('#CountryCode').val($('#country').val());
});
&lt;/script&gt;
</code></pre>

<p>Everything works fine. But the desired item is not selected in the select box</p>
