There is a text for example

$short='Текст Текст Текст Текст <br>Текст Текст Текст Текст Текст '; 

Displayed on the page with this code

 echo "\n<b>Краткая новость</b>: <textarea name=\"short\" rows=\"20\" cols=\"95\" value=\"\">$short</textarea><br><br>"; 

The essence of the problem is: the whole text is displayed in one line, how do I format the text so that the field <br> full textarea is a paragraph, below I will give two screenshots as they are and how it should

Thank you in advance!

As it is:

alt text

How to:

alt text

  • [NL2BR] [1] [1]: php.su/functions/?nl2br - Artem
  • the opposite is necessary;) - thunder
  • well yes :) this is the first thing that came to mind. - Artem

1 answer 1

Add before echo:

 $short = str_replace('<br>', "<br>\n\n", $short); 
  • one
    Outperformed =))))) - knes