SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast thenk83's Avatar
    Join Date
    Sep 2005
    Location
    Hacienda Heights, CA
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Carriage Return & Forms

    This may be way out of the realm of php and require Java but I thought I might ask anyways. I'm working on my personal website where I will post code of different projects I've worked on. The dealio is I don't what to add <br /> at the end of every line of code. Is there a way for php to detact that with chr() or maybe I'm totally off base. Please help! Thanks

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps nl2br() is what you want?

    Or you could always wrap your output in a <pre> element.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •