Making "Space" Recognised in Memo Content Boxes,

Discussion in 'PHP' started by roxy, Apr 7, 2006.

  1. #1
    Making "Space" Recognised in Memo Content Boxes, While putting some content when a visitor posts, Can any body help me on this

    - Other than the HTML Editor Enabled Boxes

    Roxy
     
    roxy, Apr 7, 2006 IP
  2. inerte

    inerte Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Multiple spaces are combined into one on HTML.

    So, this html code:

    
    Test    String
    
    Code (markup):
    Will become:

    
    Teste String
    
    Code (markup):
    When displayed.

    You need to replace "spaces" with the HTML entity " "

    echo str_replace(' ', ' ', $var);

    I hope I understood what you asked. :p
     
    inerte, Apr 7, 2006 IP