echo CHtml::dropDownList('question','',UsersQuestions::getAllQuestionsWithEmpty(),array( 'options'=>array( $question['Question_ID']=>array('selected'=>'selected')), 'class'=>'questions_dropdown', 'id'=>false )); echo '<br/>'; echo '<input type="text" class="answer txtfield" name=answers['.$key.'] autocomplete="off" value="'.$value.'" >'; echo '<div class="input_error" style="display: none;color: #ff0000;font-size: 10px;">Value can\'t be empty! Value can contain only literal symbols and digits! </div>'; echo '<br/>'; echo '</div>'; } } else { for ($i=1;$i<=3;$i++) { echo '<div class="row" style="padding-left: 10px;margin-bottom:15px;margin-top: 9px; ">'; echo CHtml::dropDownList('question','',UsersQuestions::getAllQuestionsWithEmpty(),array( 'class'=>'questions_dropdown_register', 'id'=>false )); echo '<br/>'; echo '<input type="text" class="answer txtfield" name=answers['.$question['Question_ID'].'] autocomplete="off" >'; echo '<div class="input_error" style="display: none;color: #ff0000;font-size: 10px;">Value can\'t be empty! Value can contain only literal symbols and digits! </div>'; echo '<br/>'; echo '</div>'; } } ?> <div style="clear: both;"></div>