Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    tek
    tek is offline
    New Coder
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not having to enter <br>

    First off, I couldn't find anything about this, I know I suck at searching so if you know a place where I can find the answer, great.

    The question:

    I created a "news system" for someone, but ofcourse you have to add <br> to the end of all sentences to tell the html a new sentence starts. How do I tell my script to automatically add a <br> whenever someone ends a line in a text area or skips a line in a text area?

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    http://php.net/nl2br

    converts newlines to <br>s (or <br />s in more recent PHP versions)


  •  

    Posting Permissions

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