SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast akstar's Avatar
    Join Date
    Feb 2009
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    the display data does not follow proper spacing

    hi guys,

    when I enter data into my textbox, I done it with proper spacing, proper alignment.

    Example

    This is line 1
    This is subline 1.0
    This is subsubline 1.0.0
    Start line 2

    It was successfully saved them into MySql.
    then I proceed on to display the data using echo.
    and yes it can display the data.

    but the problem is, all the alignments and spacing that i done is gone.

    its like

    This is line 1 This is subline 1.0 This is subsubline 1.0.0 Start line 2
    Any idea how to properly display a data ?
    or am I using a wrong text box ?

  2. #2
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by akstar View Post
    hi guys,

    when I enter data into my textbox, I done it with proper spacing, proper alignment.

    Example




    It was successfully saved them into MySql.
    then I proceed on to display the data using echo.
    and yes it can display the data.

    but the problem is, all the alignments and spacing that i done is gone.

    its like



    Any idea how to properly display a data ?
    or am I using a wrong text box ?
    Try to wrap your result in the <pre> ..... </pre> tags

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2006
    Location
    Wigan, Lancashire. UK
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sharedlog.com View Post
    Try to wrap your result in the <pre> ..... </pre> tags
    or echo nl2br($data)
    ---
    Development Projects:
    PHPExcel
    PHPPowerPoint

  4. #4
    SitePoint Enthusiast akstar's Avatar
    Join Date
    Feb 2009
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sharedlog.com View Post
    Try to wrap your result in the <pre> ..... </pre> tags
    woohoooo
    it works
    thank you Sharedlog.com and Mark Baker for the reply.
    PROBLEM SOLVED!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •