Create table tbl_country
country_name | id
Philippines | 1
USA | 2
<div class="row"> <?php echo $form->dropDownList($model,'country_id', CHtml::listData(Country::model()->findAll(), 'id', 'country_name'), array('empty'=>'Select Country'))?> </div>
tutorial101 is the one place for high quality web development, Web Design and software development tutorials and Resources programming. Learn cutting edge techniques in web development, design and software development, download source components and participate in the community.
<div class="row"> <?php echo $form->dropDownList($model,'country_id', CHtml::listData(Country::model()->findAll(), 'id', 'country_name'), array('empty'=>'Select Country'))?> </div>