Results 1 to 3 of 3

Thread: [RESOLVED] Great for \n nl2br but what about keeping indents?

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2004
    Location
    UK
    Posts
    119

    Resolved [RESOLVED] Great for \n nl2br but what about keeping indents?

    Hello I'm a little lost on this, I'm displaying the output of a tutorials system and am use htmlentities() and nl2br however when users post information like the body of the tutorial and say it has a piece of code like:

    Code:
    If blah = blah
         Look here, this is indented
    end if
    but the output makes it appear flat like

    Code:
    If blah = blah
    Look here, I'm FLAT
    end if
    how can I keep any spaces before the start of a string for each line, how can I retrieve that indent????
    Last edited by Shadows; Dec 21st, 2005 at 11:28 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width