Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-31-2005, 01:56 PM   #1 (permalink)
Odoggy5
Registered User
 
Odoggy5's Avatar
 
Join Date: Aug 2003
Location: SF
Posts: 45
Odoggy5 is on a distinguished road
Send a message via AIM to Odoggy5
text wrap

anybody know how I can pull data out from my MySQL databse the same way I put it in? I dont know if there any text wrap features, I am using an HTML form with text wrap to input it into my tables, how can I make it come out the same way?
Odoggy5 is offline   Reply With Quote
Old 08-31-2005, 06:30 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
i think this is the problem, .. correct me if i'm wrong. you are using a text box just like you used to type your post.

then, to print it to the screen, you are not putting it in a text box, but rather just plain html.

if this is the issue, then it is not a problem. the text is going out the same way it goes in.

html does not recognize a line break, but rather the html tag <br>

fortunately for you, php has a function that converts line breaks to br tags.
PHP Code:
<?
$text 
"hi my
name is
mike"
;

echo 
nl2br($text);
?>
__________________
Mike
sde is offline   Reply With Quote
Old 09-02-2005, 02:57 AM   #3 (permalink)
whiteFLAME
Registered User
 
Join Date: Sep 2005
Posts: 4
whiteFLAME is on a distinguished road
I think he is refering to wordwrap. There is a very good example here: http://www.snippetcollection.com/snippet/php/65
whiteFLAME is offline   Reply With Quote
Old 09-02-2005, 04:04 PM   #4 (permalink)
Odoggy5
Registered User
 
Odoggy5's Avatar
 
Join Date: Aug 2003
Location: SF
Posts: 45
Odoggy5 is on a distinguished road
Send a message via AIM to Odoggy5
Quote:
Originally Posted by sde
you are using a text box just like you used to type your post.
exactly, and that worked, thanks!
Odoggy5 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Searching freesoft_2000 Java 2 12-02-2004 07:38 AM
[MySQL] blob vs text redhead PHP 2 03-29-2004 11:15 PM
Word Wrap with Mysql type Text??? toe_cutter PHP 8 09-10-2002 12:25 PM


All times are GMT -8. The time now is 07:07 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting