yii2:drop-down list for multiple values concat in one line

后端 未结 4 1945
梦如初夏
梦如初夏 2020-12-14 17:06

for my drop-down list I am using this code.

field($medicinerequest, \'[\' . $id . \']\' . \'medicine_name\')
->DropDownList(ArrayHelper::         


        
4条回答
  •  温柔的废话
    2020-12-14 17:50

    The anonymous function could be

    function ($element) {
       return $element['medicine_name'] . '-'. $element['medicine_id'];
    }
    

    You can check here!

提交回复
热议问题