Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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

  #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

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

Or do a little regular expression like:
preg_replace('/$/','<br />',$mytext)

Don't Stand on your head - you'll get footprints in your hair
  #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

u can use


nl2br() also


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

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