How To Get Value From Db In Chtml

hi

This is the example by which i want that the priority fetch from db is selected,but we cant fetch it.

Please help

<td><?php echo Chtml::dropdownList(“vendor_priority[$id_vendor]”, ‘’, $priority, array(‘prompt’ => ‘Select One’));?></td>

Thank You

Hi,

you can use the model to populate the data to the dropdownlist,

example,

echo $form->dropDownList($yourpriorityModel, ‘priority_column_name’, $data result, array(‘empty’ => ‘-- Select–’, ‘style’ => ‘width:150px;’));