3
I’m developing a PHP posting system with Mysql.
I need the line breaks that user enter in textarea are converted into <br />.
The variable $texto (contains the content of the post) goes to the database in the column conteudo (text type).
When the user breaks the line on textarea, a space is automatically added. I needed to replace this space with a <br />.
Perfect! Exactly what I needed! Thank you! (when you give the minimum time, I accept the answer)
– Daniel Bonifácio
I recommend that you save the original version with nl, and use the function when displaying it as HTML, it is more practical if you need to put the content in a textarea for editing...
– Jader A. Wagner