?> <table> <tr> <td style="padding: 5px;"> <?php echo Html::tag('p', 'Назначенные роли'); $assignment = []; foreach ($roles as $item) { $assignment[] = $item->item_name; } echo Html::listBox('roles', null, $assignment); ?> </td> <td style="padding: 5px;"> <?php echo Html::tag('p', 'Доступные роли'); $auth = AuthAssignment::find()->all(); $assignment = []; foreach ($auth as $item) { $assignment[] = $item->item_name; } echo Html::listBox('roles', null, $assignment); ?> </td> </tr> </table> </div>