I\'m using a textarea to enable users to input comments. However, if the users enters new lines, the new lines don\'t appear when they are outputted. Is there any way to m
Two solutions for this:
PHP function nl2br():
e.g.,
echo nl2br("This\r\nis\n\ra\nstring\r"); // will output This is a string
Wrap the input in tags.
See: W3C Wiki - HTML/Elements/pre