Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    307
    Tokens
    0

    Default TEXTAREA line breaks?

    Hey peeps,

    I've got an edit profile sort of thing, and I want to make it so when they hit enter and it goes down a line in my textarea box on the form, that will show on the frontend page. So they don't have to use <br>. It shows the text on two different lines when editing in the textarea box eg.

    line1
    line2

    And this is how it shows up on the frontend page:

    line1 line2

    Would appreciate some help from you fine coders.

    Cheers,
    Chris.

    P.S This is coded in HTML/PHP.

  2. #2
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Use the function nl2br().

    So:

    PHP Code:
    echo nl2br$message ); 

  3. #3
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    307
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    Use the function nl2br().

    So:

    PHP Code:
    echo nl2br$message ); 
    Brilliant!

    Thanks.

  4. #4
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    I didn't need this, but it's useful.

    Lol for someone who's made user systems can't believe I didn't know that

    ty.


Posting Permissions

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