title: How to select a default option of a dropdownList in Yii framework 2.0
body: <p>Below is my code snippet of Yii framework 2.0 ActiveField/DropdownList</p>
  
  <pre><code>$form = ActiveForm::begin();
  
      foreach ($settings as $index =&gt; $setting) {
  
          for($i = 0; $i &lt; 3; $i++) {
               echo $form-&gt;field($setting, "[$index]option[]")-&gt;dropdownList(['0' =&gt; 'A', '1' =&gt; 'B', '2' =&gt; 'C']) ?&gt;
          }
      }
  
  ActiveForm::end();
  </code></pre>
  
  <p>With the for loop above I have a dynamic set of models within a form and each model has 3 dropdownLists of the same property <code>option</code> which can be submitted as an array. When <code>$i = 0</code> I would like to select option <code>A</code> as default. When <code>$i = 1</code> I would like to select option <code>B</code> as default and When <code>$i = 2</code> I would like to select option <code>C</code> as default.</p>
  
  <p>How can I do that?</p>