Break Line inside textarea

Hi

I’m using dynamic form with textarea…i have stored in my bd this example:


<?= $form->field($model, "[{$index}]information")->textarea(['rows' => '10'])->label(false); ?>

How can i show the text above with break lines?

I wanna this result:

Thank you

You can save the submitted form in the database and when you render in the view, you may use


 echo nl2br(Html::encode($model->information)); 

ok, I wrote $model->information only for your understanding, you may use the correct parameter name instead of information.

I don’t know how i can do it with this…




      $param=$index.'information';

      echo nl2br(Html::encode($model->$param));