does anybody know how to populate a dropdown list with a mongodb collection?
wont work because
PHP warning Illegal offset type...which based on the stack-trace means an object cannot be used as an array key.
so how do i get the mongoId string to use as the key in the dropdown list???
$list = CHtml::listData($industryModels, '_id', 'name'); echo $form->dropDownListRow($model, 'industry_id', $list);'
wont work because
_idis a mongoId object and toString is not automatically called. i get the following error:
PHP warning Illegal offset type...which based on the stack-trace means an object cannot be used as an array key.
so how do i get the mongoId string to use as the key in the dropdown list???