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
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default Echoing out text

    Oki, so i enter text in a form.. a textarea, like below:

    Hi
    My name is lewis

    blah blah
    It inserts it into the database, but when it echos it back out, it echos it as

    HiMy name is lewisblah blah
    how do i stop this from happening and have the breaks work when echoed out.

  2. #2
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    Before inserting it into the database, replace the linebreak with <br>

    e.g.

    $data = eregi_replace("\n", "<br>", $data);

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

  3. #3
    Join Date
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default

    Thankies =]

  4. #4
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    Or use the nl2br function.
    kinda quit.

Posting Permissions

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