The method in the controller:
$CallsMaindata = Yii::$app->request->post('CallsMaindata'); $id = Yii::$app->request->post('editableKey'); $model = CallsMaindata::find()->where(['id' => $id])->one(); if(is_array($CallsMaindata)){ foreach ($CallsMaindata as $callsMaindatum) { $model->call_status = $callsMaindatum['call_status']; break; } }
Due to the fact that call_status in the array of post CallsMaindata comes constantly under different index, we have hostility foreach with a break(well, that should come only one line, so take just the first).
Someone faced, what could be the reason?
Thank you.