Keep selected options in multiple select PHP
<p>I need to keep selected the options users choose in a multiple select menu. This is the code I have so far, but still doesnt' work. Thank you for your help!</p>

<pre><code>&lt;select name="cb_estatura2[]" size="6" multiple="multiple" class="inputbox" id="cb_estatura2"&gt;
&lt;?php 
$height = array("57","58","59","60");
$choosen_height = $_GET['cb_estatura2'];

for ($i=0;$i&lt;count($height);$i++) 
     {
      $selected = ($height[$i] == $choosen_height[$i] ? 'selected="selected"' : ''); 
      echo "&lt;option value='$height[$i]' $selected&gt;$height[$i]&lt;/option&gt;";
     } 
?&gt;
&lt;/select&gt;
</code></pre>
