How to set multi select value from array object in yii2 while updating
问题 I have table which have multiple reference to ohter tables like user id name email categories id title user_categories user_id category_id Here a user will have multiple category associated with him/her I am able to save these successfully with new records like following View File: echo $form->field($package_categories, 'category_id')->dropDownList( ArrayHelper::map( StudyMaterialCategories::find()->all(), 'id', 'title'), ['multiple' => true] ); Save New record: $model = new Packages();