Deux solutions pour cela :
-
Fonction PHP
nl2br():par exemple,
echo nl2br("This\r\nis\n\ra\nstring\r"); // will output This<br /> is<br /> a<br /> string<br /> -
Enveloppez l'entrée dans
<pre></pre>balises.Voir : W3C Wiki - HTML/Elements/pre
Deux solutions pour cela :
Fonction PHP nl2br()
:
par exemple,
echo nl2br("This\r\nis\n\ra\nstring\r");
// will output
This<br />
is<br />
a<br />
string<br />
Enveloppez l'entrée dans <pre></pre> balises.
Voir : W3C Wiki - HTML/Elements/pre