how to insert tab in an html page???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vishal

    how to insert tab in an html page???

    hi i am amking one appllication inwhich the user enters text in
    textarea field. i am saving this value in database and when user
    accesses value from database, i want to display text in a format
    entered by user. i.e. if the user has entered some text in 2nd line
    then it should be displayed on second line and not after the end of
    first line in continuation. if user has entered tab in some location,
    the tab will be displayed while viewing data from database.

    thxs for help in advance...

  • vinu

    #2
    Re: how to insert tab in an html page???

    hi.
    you can use nl2br to format the user's text when you display it.
    [color=blue]
    >From PHP Manual:[/color]
    nl2br -- Inserts HTML line breaks before all newlines in a string
    Inserts HTML line breaks before all newlines in a string


    Comment

    • Joe Estock

      #3
      Re: how to insert tab in an html page???

      vishal wrote:[color=blue]
      > hi i am amking one appllication inwhich the user enters text in
      > textarea field. i am saving this value in database and when user
      > accesses value from database, i want to display text in a format
      > entered by user. i.e. if the user has entered some text in 2nd line
      > then it should be displayed on second line and not after the end of
      > first line in continuation. if user has entered tab in some location,
      > the tab will be displayed while viewing data from database.
      >
      > thxs for help in advance...
      >[/color]
      Or surround your users input with <pre></pre> e.g.,

      <pre>
      my text here.
      new line here
      </pre>

      Comment

      Working...