Model class for static data
Posted 09 April 2010 - 05:55 AM
I'm wondering what would be the "best" approach for this:
I need a list of countries for a dropdownlist. For this I've created a model class derived from CFormModel which holds a public $countries array containing all countries.
This model is passed to the form where it can be used to populate a dropdownlist by simply using $countryMode->counties.
Would this be the yii way to go?
Posted 09 April 2010 - 06:04 AM
if you read them from some txt file or code it manuali in the code than the array is OK
Posted 09 April 2010 - 08:19 AM