I'm developing a PHP post system with MySQL.
I need the line breaks that the user enter in textarea
to be converted to <br />
.
The variable $texto
(contains the contents of the post) goes to the database in the column conteudo
(type TEXT).
When the user breaks the line in textarea
, a space is automatically added. I needed to replace this space with a <br />
.