Text from database - convert to html -


I have received a text from the database and I want to convert it to an HTML code. New lines are saved in my database, but when I ask it and echo it on my HTML code, there is no new line, because I need to put some code inside.

I found it but it does not seem to work: $ html = str_replace ("\ n", "
", $ html);

Thanks for someone else's help.

Try

  $ html = nl2br ($ html);  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -