nl2br problem
| From: | Donovan Brooke | Date: | Tue, 01 Feb 2011 19:42:34 +0000 |
| Subject: | nl2br problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-311120@lists.php.net to get a copy of this message | ||
Hello,
I have CMS form that allows HTML for the body of a site.
To keep the form somewhat WYSIWYG, I am using the
nl2br() function for displaying:
nl2br($t_body)
This works great for normal stuff.. but for pages with tables
etc.. it creates a lot of extra "<br />'s" :-).
I thought about doing an if statement.. if $t_body contains <table> then
don't use nl2br().. but I'm thinking there has got to be a better way... because pages that use both WYSIWYG returns in the form AND tables would then not display well.
Any thoughts?
Thanks,
Donovan
--
D Brooke