Posted by Markus Ernst on 06/07/06 09:07
boclair schrieb:
>> Why you don't use nl2br function? It will returns string with '<br />'
>> inserted before all newlines.
>
>
> Perhaps because it is incorrect syntax for other than XHTML. Apart from
> the fact that IE doesn't support it, other reasons not to use XHTML
> except for XML documents
I never heard about a case where <br /> did cause any problem... Anyway
this is still easier than regexps:
str_replace('<br />', '<br>', nl2br($text));
--
Markus
[Back to original message]
|