1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Norcross, GA
    Rep Power
    Is there a datatype that will hold formatting? Ie.. if a user submits a list of items:


    .. the line returns will be saved? With VARCHAR the line returns are not saved and the data returns like:

    apples oranges grapes

  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Niagara Falls (On the wrong side of the gorge)
    Rep Power
    newlines ARE saved in varchar() types (and in all textual datatypes), you just aren't displaying it correctly.

    Remember, HTML does NOT display new lines.

    If you are using PHP as your scripting language you can use the nl2br() function to convert the newline characters in the data to <BR> so they display correctly.

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 05:42 PM
  2. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  3. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 03:59 PM
  4. Javascript scrollbar - stuck on last bit
    By NayMyoSan in forum JavaScript Development
    Replies: 0
    Last Post: January 3rd, 2004, 12:05 PM
  5. Mouse over questions. n00b. :o
    By Not Tony Danza in forum HTML Programming
    Replies: 2
    Last Post: December 2nd, 2003, 06:28 AM

IMN logo majestic logo threadwatch logo seochat tools logo