Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 29th, 2006, 09:15 PM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Reply With Quote
  #2 (permalink)  
Old October 31st, 2006, 05:37 PM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old December 1st, 2006, 03:12 AM
Authorized User
 
Join Date: Nov 2006
Location: Bhopal, MP, India.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to talk2leo
Default

u can use

stripslashes($mytext)

nl2br() also

regards

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert textarea content into MySQL? a5xo3z1 Beginning PHP 14 October 2nd, 2008 01:47 PM
change content of textarea from select darkhalf Javascript 1 April 26th, 2007 06:03 AM
html textarea to DB ginoitalo Beginning PHP 1 May 30th, 2005 01:49 AM
problem displaying text fron Db to textarea mail4nrs Classic ASP Databases 4 August 20th, 2004 08:31 AM
displaying a memo in a textarea jhunta Classic ASP Basics 1 June 9th, 2003 11:04 PM



All times are GMT -4. The time now is 09:53 AM.


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