Re: nl2br problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/1/2011 2:42 PM, Donovan Brooke wrote:
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



You have an example of a page you'd like to control that we can see?

On the surface, it appears you may be able to control the rendering with advanced CSS2/3 selectors. Thus, the browsers will do the work for you.

Al..........

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux