Jump to content


Photo

**SOLVED** preserving white space from a mysql column


  • Please log in to reply
2 replies to this topic

#1 n8w

n8w
  • Members
  • PipPipPip
  • Advanced Member
  • 123 posts

Posted 29 April 2006 - 06:48 AM

How can I pull data from a mysql database and preserve the white space?

I was using the PRE tag but in IE even with the width specified it doesn't wrap the text so your html table ends up being way to wide

Is there a php function that converts the white space save in html tags? or how should I go about accomplishing this?

Thanks
n8w

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,020 posts

Posted 29 April 2006 - 07:16 AM

You might want to look at

[a href=\"http://www.php.net/nl2br\" target=\"_blank\"]http://www.php.net/nl2br[/a]
[a href=\"http://www.php.net/wordwrap\" target=\"_blank\"]http://www.php.net/wordwrap[/a]

If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 n8w

n8w
  • Members
  • PipPipPip
  • Advanced Member
  • 123 posts

Posted 29 April 2006 - 02:59 PM

[!--quoteo(post=369827:date=Apr 29 2006, 04:16 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Apr 29 2006, 04:16 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
You might want to look at

[a href=\"http://www.php.net/nl2br\" target=\"_blank\"]http://www.php.net/nl2br[/a]
[a href=\"http://www.php.net/wordwrap\" target=\"_blank\"]http://www.php.net/wordwrap[/a]
[/quote]

thanks .. works awesome





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users