title: Remove </div> HTML tag from a string in PHP
body: <p>According to the post <a href="https://stackoverflow.com/questions/1107194/php-remove-img-tag-from-string"><strong>here</strong></a>, the code below can remove the HTML tag, such as <code>&lt;div&gt;</code>. But I found that the end tag <code>&lt;/div&gt;</code> still remain in the string.</p>
  
  <pre><code>$content = "&lt;div id=\"header\"&gt;this is something with an &lt;img src=\"test.png\"/&gt; in it.&lt;/div&gt;";
  $content = preg_replace("/&lt;div[^&gt;]+\&gt;/i", "", $content); 
  echo $content;
  </code></pre>
  
  <p>I have tried something below, but still not work, how can I fix this issue?</p>
  
  <pre><code>$content = preg_replace("/&lt;\/div[^&gt;]+\&gt;/i", "", $content); 
  $content = preg_replace("/&lt;(/)div[^&gt;]+\&gt;/i", "", $content); 
  </code></pre>
  
  <p>Thanks</p>