MySQL can record linebreaks just fine in most cases, but the problem is, you need <br />
tags in the actual string for your browser to show the breaks. Since you mentioned PHP, you can use the nl2br()
function to convert a linebreak character ("\n
") into HTML <br />
tag.
Just use it like this:
<?php
echo nl2br("Hello, World!\n I hate you so much");
?>
Output (in HTML):
Hello, World!<br>I hate you so much
Here's a link to the manual: http://php.net/manual/en/function.nl2br.php