$plan = Plan::find()->where(['clinic_id' => $clinic_id])->all();
foreach($plan as $i => $pl) {
foreach($pl as $key => $value) {
if(substr($key, 0, strlen($type)) == $type) {
echo $form->field($pl, "[$i]$key")->textInput(['maxlength'=>3, 'value' => $value])->label(false);
}
}
}