Results 1 to 3 of 3

Thread: [RESOLVED] Textarea Help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2007
    Posts
    85

    Resolved [RESOLVED] Textarea Help

    I have a text area that contains this:

    Code:
    12345
    12345
    12345
    When I submit my form, I simply echo the results onto the page, but it prints like this:

    Code:
    12345 12345 12345
    How can I get it to print exactly as posted? With the new line? BTW, this is going to be public, so I don't want the users to have to use <br //>.

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Textarea Help

    you can use a function like nl2br() to convert new line characters to line breaks in HTML. you could also make a function that formats your text, so that you might be able to add something similar to bbcode to your own website.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2007
    Posts
    85

    Re: Textarea Help

    Thanks. Now I remember why I use this site! People are so helpful and not impolite in the least. Thanks a lot! Hopefully, I'll do something similar to bbcode at some point, but it's a bit project and I want to get the basics down first. Many thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width