Top Menu

How can I set the selected value in the following statement

$form->dropDownList($model, 'pair', array("2"=>"2", "3"=>"3","4"=>"4", "5"=>"5","6"=>"6","7"=>"7", "8"=>"8", '9'=>'9', "10"=>"10", "11"=>"11", "12"=>"12", "13"=>"13", "14"=>"14", '15'=>'15', '20'=>'20', '25'=>'25', '30'=>'30', '35'=>'35', '40'=>'40' , '45'=>'45' , '50'=>'50', '55'=>'55'), array('class'=>'form-control', 'options' => array('4'=>array('selected'=>true)),))  

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Close