title: CodeIgniter set_select not repopulating after post
body: <p>I've got a select box created in CodeIgniter. When I pull the value out of the databse, the form is populated no problem. But after I submit the form, the select box is reset to zero.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;select name="week[tuesday][startam]" id="" class="small"&gt;
      &lt;?php for( $i = 0; $i &lt; 24; $i=$i + 0.25 ):?&gt;
             &lt;option value="&lt;?php echo $i; ?&gt;"&lt;?php echo set_select('week[tuesday][startam]', $i, ($i==(float)$model_week['tuesday']['startam'])); ?&gt;&gt;&lt;?php printf('%02d:%02d', floor($i), ( ($i-floor($i))*60 ) ); ?&gt;&lt;/option&gt;
      &lt;?php endfor; ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I wondered if the problem was that <code>set_select()</code> is comparing the <code>$_POST[week][tuesday][startam]</code> value (which is a string) to <code>$i</code> (which is a float). But casting <code>$i</code> to a string doesn't seem to make a difference.</p>
  
  <p>Any ideas?</p>