PHP array and select list
<p>I want to use php array for HTML select list. In this case it will be the list of countries but beside of country name that is listed in drop down list I need as a value of each country short country code.</p>

<p>The php array that I'm currently using looks like:</p>

<pre><code>$wcr=array(
'Angola',
'Antigua &amp; Barbuda',
'Armenia', 
'Austria',
'Azerbaijan', 
 .....
 );
</code></pre>

<p>The PHP page that using this array:</p>

<pre><code>&lt;select name="country"&gt;&lt;option selected value=""&gt; --------- 
&lt;? $p=1;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '&lt;option value="'.$p.'"&gt;'.$val;
} ?&gt;
&lt;/select&gt;
</code></pre>

<p>The value should be short country code (something like 'ES', 'US', 'AN', ...) instead of numbers that I have right now as a values in this form. That short country codes I will write in this same PHP array somewhere, if it's possible.</p>

<p>How can I do that?</p>
