Twee oplossingen hiervoor:
-
PHP-functie
nl2br():bijv.
echo nl2br("This\r\nis\n\ra\nstring\r"); // will output This<br /> is<br /> a<br /> string<br /> -
Wikkel de invoer in
<pre></pre>tags.
Twee oplossingen hiervoor:
PHP-functie nl2br()
:
bijv.
echo nl2br("This\r\nis\n\ra\nstring\r");
// will output
This<br />
is<br />
a<br />
string<br />
Wikkel de invoer in <pre></pre> tags.