From kodeboard, 3 Years ago, written in PHP.
Embed
  1. /**
  2. * Have a list of values, want to create a dropdown and duplicate
  3. * the values to become the keys, so that the <select> <option> values
  4. * are the same.
  5. */
  6.  
  7. $array = ('blue','yellow','gold');
  8. $options = array_combine($array, $array);
  9.  

You must login to reply or comment on this code.