\\n"), $text); } $a = " one\\n two\\r\\n three"; $b = nl2brnl($a, 2); var_dump($b); /* output will be: string(30) " one two three" */ echo "
\\n "; echo $b /* output will be:
one two three */ ?>