Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: PHP  |  size: 2.78 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. I think I have to fit 'options'=>array(2=>array('selected'=>'selected') in here somewhere.
  2.  
  3. This attempt breaks things.
  4.   array('empty' => '(Select a Month)','options'=>array(2=>array('selected'=>'selected')))." ".
  5.  
  6. Here is the code.
  7. <?php echo CHtml::dropDownList('startmonth', $select,array('01' => 'January',
  8.                                                                                                                                    '02' => 'Feburary',
  9.                                                                                                                                    '03' => 'March',
  10.                                                                                                                                    '04' => 'April',
  11.                                                                                                                                    '05' => 'May',
  12.                                                                                                                                    '06' => 'June',
  13.                                                                                                                                    '07' => 'July',
  14.                                                                                                                                    '08' => 'August',
  15.                                                                                                                                    '09' => 'September',
  16.                                                                                                                                    '10' => 'October',
  17.                                                                                                                                    '11' => 'November',
  18.                                                                                                                                    '12' => 'December',),
  19.                                                                                                                                    array('empty' => '(Select a Month)'))." ".
  20.                                          CHtml::dropDownList('startyear', $select,array('2012' => '2012',
  21.                                                                                                                                     '2011' => '2011',
  22.                                                                                                                                     '2010' => '2010',
  23.                                                                                                                                     '2009' => '2009',
  24.                                                                                                                                     '2008' => '2008',                                                                                                                              
  25.                                                                                                                                         '2007' => '2007',
  26.                                                                                                                                         '2006' => '2006',
  27.                                                                                                                                         '2005' => '2005',
  28.                                                                                                                                         '2004' => '2004',
  29.                                                                                                                                         '2003' => '2003',
  30.                                                                                                                                         '2002' => '2002',
  31.                                                                                                                                         '2001' => '2001',
  32.                                                                                                                                         '2000' => '2000',
  33.                                                                                                                                         '1999' => '1999',
  34.                                                                                                                                         '1998' => '1998',
  35.                                                                                                                                         '1997' => '1997',
  36.                                                                                                                                         '1996' => '1996',
  37.                                                                                                                                         '1995' => '1995',
  38.                                                                                                                                         '1994' => '1994',
  39.                                                                                                                                         '1993' => '1993',
  40.                                                                                                                                         '1992' => '1992',
  41.                                                                                                                                         '1991' => '1991',
  42.                                                                                                                                         '1990' => '1990',
  43.                                                                                                                                         '1989' => '1989',
  44.                                                                                                                                         '1988' => '1988',
  45.                                                                                                                                         '1987' => '1987',
  46.                                                                                                                                         '1986' => '1986',
  47.                                                                                                                                         '1985' => '1985',
  48.                                                                                                                                         '1984' => '1984',
  49.                                                                                                                                         '1983' => '1983',
  50.                                                                                                                                         '1982' => '1982',
  51.                                                                                                                                         '1981' => '1981',
  52.                                                                                                                                         '1980' => '1980',
  53.                                                                                                                                         '1979' => '1979',
  54.                                                                                                                                         '1978' => '1978',
  55.                                                                                                                                         '1977' => '1977',
  56.                                                                                                                                         '1976' => '1976',
  57.                                                                                                                                         '1975' => '1975',
  58.                                                                                                                                         '1974' => '1974',
  59.                                                                                                                                         '1973' => '1973',
  60.                                                                                                                                         '1972' => '1972',
  61.                                                                                                                                         '1971' => '1971',
  62.                                                                                                                                         '1970' => '1970',
  63.                                                                                                                                         '1969' => '1969',
  64.                                                                                                                                         '1968' => '1968',
  65.                                                                                                                                         '1967' => '1967',
  66.                                                                                                                                         '1966' => '1966',
  67.                                                                                                                                         '1965' => '1965',
  68.                                                                                                                                         '1964' => '1964',
  69.                                                                                                                                         '1963' => '1963',
  70.                                                                                                                                         '1962' => '1962',
  71.                                                                                                                                         '1961' => '1961',
  72.                                                                                                                                         '1960' => '1960',),
  73.                                                                                                                           array('empty' => '(Select a Year)'));
  74.                 ?>