Removing new lines in HTML links...

Discussion in 'PHP' started by qwikad.com, Sep 26, 2012.

  1. #1
    The code below removes all " symbols in HTML links replacing them with regular quotation marks.

    [COLOR=#111111]$text = preg_replace('/<([^<>]+)>/e', '"<" .str_replace("&quot;", \'"\', "$1").">"', $text);[/COLOR]
    Code (markup):
    Using the same idea how can I remove new lines \n in HTML links?

    Will it be something like this:

    [COLOR=#111111]$text = preg_replace('/<([^<>]+)>/e', '"<" .str_replace("\n", \'\', "$1").">"', $text);[/COLOR]
    Code (markup):


    Or no?
     
    qwikad.com, Sep 26, 2012 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
  3. Irfi0009

    Irfi0009 Banned

    Messages:
    17,584
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    48
    #3
    wow thanks it is very useful my web designer.
     
    Irfi0009, Sep 27, 2012 IP
  4. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,373
    Likes Received:
    1,720
    Best Answers:
    31
    Trophy Points:
    475
    #4
    Ok, thanks! I will look into it.
     
    qwikad.com, Sep 28, 2012 IP