How to preg_replace div class in single quotes?

Discussion in 'PHP' started by nasi, Jan 6, 2012.

  1. #1
    Hi,
    Two guys here helped me to solve my PHP problems (thanks very much to them),but I have one more

    I want to replace a div class + ID which has single quotes.

    <div class='SingleQuote' id='SingleQuote00000_000000_KR'>

    I repalce double quotes classes + ID's with that:

    $html = preg_replace('#class=" DoubleQuotes" id="(.*?)"#','',$html);

    Thanks in advance
    Nasi
     
    nasi, Jan 6, 2012 IP