
Untitled
By: a guest on
May 6th, 2012 | syntax:
PHP | size: 2.78 KB | hits: 20 | expires: Never
I think I have to fit 'options'=>array(2=>array('selected'=>'selected') in here somewhere.
This attempt breaks things.
array('empty' => '(Select a Month)','options'=>array(2=>array('selected'=>'selected')))." ".
Here is the code.
<?php echo CHtml::dropDownList('startmonth', $select,array('01' => 'January',
'02' => 'Feburary',
'03' => 'March',
'04' => 'April',
'05' => 'May',
'06' => 'June',
'07' => 'July',
'08' => 'August',
'09' => 'September',
'10' => 'October',
'11' => 'November',
'12' => 'December',),
array('empty' => '(Select a Month)'))." ".
CHtml::dropDownList('startyear', $select,array('2012' => '2012',
'2011' => '2011',
'2010' => '2010',
'2009' => '2009',
'2008' => '2008',
'2007' => '2007',
'2006' => '2006',
'2005' => '2005',
'2004' => '2004',
'2003' => '2003',
'2002' => '2002',
'2001' => '2001',
'2000' => '2000',
'1999' => '1999',
'1998' => '1998',
'1997' => '1997',
'1996' => '1996',
'1995' => '1995',
'1994' => '1994',
'1993' => '1993',
'1992' => '1992',
'1991' => '1991',
'1990' => '1990',
'1989' => '1989',
'1988' => '1988',
'1987' => '1987',
'1986' => '1986',
'1985' => '1985',
'1984' => '1984',
'1983' => '1983',
'1982' => '1982',
'1981' => '1981',
'1980' => '1980',
'1979' => '1979',
'1978' => '1978',
'1977' => '1977',
'1976' => '1976',
'1975' => '1975',
'1974' => '1974',
'1973' => '1973',
'1972' => '1972',
'1971' => '1971',
'1970' => '1970',
'1969' => '1969',
'1968' => '1968',
'1967' => '1967',
'1966' => '1966',
'1965' => '1965',
'1964' => '1964',
'1963' => '1963',
'1962' => '1962',
'1961' => '1961',
'1960' => '1960',),
array('empty' => '(Select a Year)'));
?>