p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro PHP (http://p2p.wrox.com/forumdisplay.php?f=96)
-   -   Displaying textarea content to html table (http://p2p.wrox.com/showthread.php?t=49581)

keithc October 29th, 2006 09:15 PM

Displaying textarea content to html table
 
Have php pulling result and echoing rows to table, problem i have is when outputting data submitted from a textarea within a form is i get one line and no wrap. Not sure how to get this output formatted properly


ciderpunx October 31st, 2006 05:37 PM

The quicker way is probably just to use <pre> tags.

Or do a little regular expression like:
Code:

preg_replace('/$/','<br />',$mytext)
HTH

--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com

talk2leo December 1st, 2006 03:12 AM

u can use

stripslashes($mytext)

nl2br() also

regards



All times are GMT -4. The time now is 08:42 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.