Try nl2br()
instead:
echo nl2br($str);
More Related Contents:
- Scrollable PHP Table [closed]
- Parse error: syntax error, unexpected T_STRING in C:\wamp\www\b_php\project\login_save.php on line 14 [closed]
- PHP Multidimensional associative array to HTML table
- How to add html menu in php [closed]
- php login don’t work
- Array to string conversion in php check my code
- Pagination data
- Grabbing the href attribute of an A element
- How to get multiple selected values of select box in php?
- PHP Parse HTML code [duplicate]
- Set up the base url in codeigniter
- Opening/closing tags & performance?
- How to remove line breaks (no characters!) from the string?
- Can HTML be embedded inside PHP “if” statement?
- How to embed YouTube videos in PHP?
- Delete multiple rows by selecting checkboxes using PHP
- PHP DOMDocument errors/warnings on html5-tags
- PHP HTML DOMDocument getElementById problems
- How to add a delete button to a PHP form that will delete a row from a MySQL table
- Send email with PHPMailer – embed image in body
- DOM parser that allows HTML5-style
- getting a checkbox array value from POST
- How to get ¤ to display literally, not as an HTML entity
- Web scraping in PHP
- PHP “pretty print” HTML (not Tidy)
- PHP E-mail Form Sender Name Instead Of E-mail?
- POST arrays not showing unchecked Checkboxes
- saving checkbox state on reload
- How to safely output HTML from a PHP program?
- loadHTML LIBXML_HTML_NOIMPLIED on an html fragment generates incorrect tags