0

I noticed that when I submit text to my MySQL form in VARCHAR it does store line breaks. (Since they show in PHPMyAdmin). However when I echo column Text, I get everything in a single line.

How can I echo values retaining line breaks?

1
  • it does store line breaks, but html interpreters (browsers) do not do anything with them, you need the html equivalent of <br> Commented Feb 26, 2012 at 22:38

2 Answers 2

5

nl2br()

Sign up to request clarification or add additional context in comments.

Comments

1

have you tried http://php.net/manual/en/function.nl2br.php

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.