Carriage return and Textarea

Hy all,

I use in my Admin part a textarea (nothing special, the textarea provided by Gii).

I write to lines.

line 1

line 2

Those lines appears in the same way when I take a look in the table content with phpmyadmin

However when I see the result in a view (in the admin generated view AND in my non admin view) those lines are (with no carriage return) :

line1 line2

I don’t know why.

Have you some hints ?

Thanks

Actually it’s not Yii related question.

  1. New lines in a html code != new lines on a page.

  2. See this PHP function.

  3. Maybe use some WYSIWYG editor? For example, TinyMCE. Such editors insert <p> or <br> tags automatically.

Thank you Andy for your reply

I try and its works fine.