How to display line breaks?

Дата добавления:
18.08.2010
Хиты:
1132
Рейтинг:
 
Голосовать:
Хорошо - Плохо

Ответ

Task

I have a text field that has returns in it, however these are not displayed. Is there a way to correct this?

Solution

To display line breaks in your DW Anything module output, you'll need to replace the line break characters from your text field with HTML "<br/>" tags.

Example

You have a table "_text_table" and a field in it called "text".

To display the line breaks from this field, use the following SQL query:

SELECT REPLACE(`text`, CHAR(10), '<br/>') AS `text` FROM `_text_table`

Категория

Добавить комментарий


Защитный код
Обновить

SEO by Artio