title: Multi select PHP
body: <pre><code>&lt;form action="&lt;?=$_SERVER['PHP_SELF']?&gt;" method="post"&gt;
  &lt;select name="test[]" multiple="multiple"&gt;
      &lt;option value="one"&gt;one&lt;/option&gt;
      &lt;option value="two"&gt;two&lt;/option&gt;
      &lt;option value="three"&gt;three&lt;/option&gt;
      &lt;option value="four"&gt;four&lt;/option&gt;
      &lt;option value="five"&gt;five&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type="submit" value="Send" /&gt;
  &lt;/form&gt;
  &lt;?php
  
      $test=$_POST['test'];
      if ($test){
       foreach ($test as $t){echo 'You selected ',$t,'&lt;br /&gt;';}
      }
  if($t=='one')
     $price1=12;
  if($t=='two')
     $price2=2;
  $total = $price1 + $price2;
  
  echo $total;
  </code></pre>
  
  <p>When one &amp; two are both selected i'd like the result to be 14. What is the best way to make an addition to obtain 14 as a result ?</p>