title: How to change <div> class using php?
body: <p>how can i change a  class using PHP?</p>
  
  <pre><code>&lt;div class="divcss red-bg"&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;div class="divecss blue-bg"&gt;
  </code></pre>
  
  <p>I'm using a config file and want to add the code there so i can change the div-backgrounds on all pages without extra code in any file.</p>
  
  <p>I already tried to work with preg_replace but didnt get it yet</p>
  
  <pre><code>preg_replace('/class="divecss red-bg"/', 'class="divecss blue-bg"');
  </code></pre>
  
  <p><strong>Best Regards, GangstaSunny.</strong></p>