D
D
del9937882017-02-07 18:28:33
Yii
del993788, 2017-02-07 18:28:33

How to output textarea text from database with formatting in yii2?

Hello. I display the table cell I need in this way: But the text is displayed without formatting. When I filled in the textarea, I made transfers, and these transfers are in the database, and when I display it, the text, on the site, it is written in one line, i.e. without formatting. What to do? How to get my transfers?
<?= $model->info ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-02-07
@del993788

Good evening.
There is nl2br , it will display your text with newlines.
In yii2 try using asNtext . Read more here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question