how to auto break lines?

Discussion in 'PHP' started by Ovlznvvz, Jul 22, 2011.

  1. #1
    Hello;
    I send long texts into the database via a form which includes text areas. Then I want to get that content in a new file. However, there are very long lines which I can't limit either by table width or another method. I use <pre>...</pre> tags as well in the output file but that works as long as I manually break the lines while the text is still in the form, which is quite impractical as I paste the text into the text area from another source, such as ms-word.

    Is there a method to limit the line length that is retrieved from the database
     
    Ovlznvvz, Jul 22, 2011 IP
  2. dthoai

    dthoai Member

    Messages:
    106
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    38
    #2
    You use following codes (with changing your text's width):

    
    <pre style="width: 500px; white-space: normal;">
    Your text here
    </pre>
    
    Code (markup):
     
    dthoai, Jul 22, 2011 IP