SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Almeaty Member
    Join Date
    Jul 2000
    Location
    Nowhere
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With a form the user can enter text into my mysql database, and I want to display it afterwards again, if possible exactly as the user has typed. so including the new lines he may have done. however we know that html ingores returns and just goes on with the line.

    when fetching the text with PHP, how can I replace all the returns with a '<br>' ?

  2. #2
    SitePoint Enthusiast Sparklit's Avatar
    Join Date
    Jul 2000
    Location
    Victoria,BC,Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the nl2br function http://www.php.net/nl2br


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
  •