Not a big problem,but i wanna figure it out why. I was reading at Yii2 By Example. And i noticed that view file in the exmaple of a db Transaction. it's about dropdownlist,here is the code:
<?= $form->field($reservation, "room_id")->
dropDownList(ArrayHelper::map(Room::find()->all(), 'id',
function($room, $defaultValue) {
return sprintf('Room n.%d at floor %d', $room->room_number, $room->floor);
})); ?>
I tried it with and without the $defaultValue.Both worked. so what is the use of the "$defaultValue"? or it just a non-sence. I googled it and have no idea. Thank you for your time.