hidden string

Discussion in 'PHP' started by bartolay13, Jun 21, 2010.

  1. #1
    heres a sample string when i pass a textbox,

    Clinical History:  Patient fell off a ladder
    
    Technique:  DX right knee (2 views)
    
    Comparison:  No study for comparison is available at the time of interpretation.
    
    The alignment and mineralization of the visualized bony structures are well maintained.  There may be a subtle cortical defect along the junction of the proximal fibular head and neck. Mild osteophyte formation is noted at the patella and medial tibial plateau. There is prominence of the suprapatellar soft 
    HTML:
    my question is,, what characters makes this paragraph creates a new line???
    i want to replace that character..

    i tried parsing for "<br>", "\n" but none
     
    bartolay13, Jun 21, 2010 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    What are you trying to do with the text? Why do you try to parse it for line feeds?
     
    stephan2307, Jun 21, 2010 IP
  3. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #3
    i need to replace that string to "<br>" to become full html text.. some browsers doesnt recognized that new line.
     
    bartolay13, Jun 21, 2010 IP
  4. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #4
    nvm.. found it, its "\n\n" i thought its only "\n"
     
    bartolay13, Jun 21, 2010 IP
  5. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #5
    why don't you do use a ready made function nl2br ?
     
    stephan2307, Jun 21, 2010 IP
  6. HuggyEssex

    HuggyEssex Member

    Messages:
    297
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    45
    #6
    ^^ That's what I would use.
     
    HuggyEssex, Jun 21, 2010 IP