I liked the function contributed here:PHP - PRE-select drop down option\[code\]function generateSelect($name, $options, $optionToSelect) { $html = '<select name="'.$name.'">'; foreach ($options as $option => $value) { if($value =http://stackoverflow.com/questions/12766998/= $optionToSelect) $html .='<option value="'.$value.'" selected="selected">'.$value.'</option>'; else $html .= '<option value="'.$value.'">'.$value.'</option>'; } $html .= '</select>'; return $html;}/* And then call it like */$html = generateSelect('company', $companies, 'Apple');\[/code\]However, this doesn't address a description that is needed sometimes with drop-down menu.For example:\[code\]<select name="ranges"><option value="http://stackoverflow.com/questions/12766998/0">All Ranges</option><option value="http://stackoverflow.com/questions/12766998/1">Under $10,000</option><option value="http://stackoverflow.com/questions/12766998/2">$10,000 - $25,000</option><option value="http://stackoverflow.com/questions/12766998/3">$25,000 - $50,000</option><option value="http://stackoverflow.com/questions/12766998/4">$50,000 - $75,000</option><option value="http://stackoverflow.com/questions/12766998/5">$75,000 - $100,000</option><option value="http://stackoverflow.com/questions/12766998/6">$100,000 - $200,000</option><option value="http://stackoverflow.com/questions/12766998/7">$200,000 or more</option></select>\[/code\]What needs to be modified for the generateSelect function to allow it to assign, for example, along with a value of "4", but a description of "$75,000 - $100,000" to accompany it? The way the generateSelect function is now, it would assign a value of "4" and place in the description (for lack of a better term) also a "4".Or is there a better way to do this in PHP? Thanks!