title: Drupal 6 $key => $value form #options array built using while loop where $key = $value
body: <p>I'm trying to build an array of $key => $values using a while loop where the $key is equal to the value, from a db_query. I think the syntax isn't correct</p>
  
  <pre><code>function _form(){
  
  $person = db_query("SELECT name FROM {person}");                 
  $columnValues = Array();
  
  while ($row = db_fetch_array($person) ) {
    $columnValues[] = array($row['name']=&gt; $row['name']);
  }
  .
  .
  .
  </code></pre>
  
  <p>I have a few questions. </p>
  
  <ol>
  <li>do i need to create a key to pull out the actual 'select' menu item value?</li>
  <li>if i need to create a key, is there a way in the while loop to not create a new array for each element that is keyed by its same value (eg. apple => apple)</li>
  <li>what is the correct way to pull out values from checkboxes and from select so i get a string and not an ordered number? (eg. form_values['value']['select_name'] , form_values['value']['checkboxes_name']  so that first returns selected item 'apple' and second gives checked item 'apple'.)  ... i like apples. </li>
  </ol>