The drop-down list automatically selects the parameter corresponding to the value of the specified attribute of the specified model. In this case, an option is selected with a value equal to $project->city.
So, if you want to control which option, just do
$project->city = $valueOfThatOption;
before calling activeDropDownList.
It doesn’t matter (and should not) if this parameter is 1, 10 or something else.
source
share