Chtml::listdata Upper-Case First Letter In Name

I have a drop down list of status names that are all lowercase in the DB, but I would like to upper-case. Is there a simple way I can do this all in-line?

echo $form->dropDownList($model,'status',CHtml::listData(Status::model()->findAllByAttributes(array('enabled'=>true)), 'id', 'name'), array('empty'=>''));


Try this.

array_map(“ucfirst”, CHtml::listData(Status::model()->findAllByAttributes(array(‘enabled’=>true)))


chandran nepolean

Perfect!!! Thank you!