title: Echo selected value drop down list PHP
body: <p>I have a drop down list and when I select a value in it I need to print the value of the choice I made. This is the code i have so far:</p>
  
  <pre><code>&lt;?php
  $aPersoon = array( 10=&gt;'Barends', 20 =&gt; 'van Hulten', 30 =&gt; 'Jansen', 40 =&gt; 'Waili', 50=&gt; 'Ketelaars');
  ?&gt;
  </code></pre>
  
  <p>Array</p>
  
  <pre><code>&lt;select name="per1" id="per1"&gt;
            &lt;option selected="selected"&gt;Kies een&lt;/option&gt;
            &lt;?php
              foreach($aPersoon as $key =&gt; $value):
              echo '&lt;option value="'.$key.'"&gt;'.$value.'&lt;/option&gt;';
  
              endforeach;
              ?&gt;
          &lt;/select&gt;
  </code></pre>
  
  <p>All the names are in the drop down list. When, I for example, click on <code>Jansen</code> I need to echo the value <code>30</code> because that's the value of <code>Jansen</code>.</p>