title: Why doesn't strip_tags work in PHP?
body: <p>I've got the following code:</p>
  
  <pre><code>&lt;?php echo strip_tags($firstArticle-&gt;introtext); ?&gt;
  </code></pre>
  
  <p>Where $firstArticle is a stdClass object:</p>
  
  <pre><code>object(stdClass)[422]
    public 'link' =&gt; string '/maps101/index.php?option=com_content&amp;view=article&amp;id=57:greenlands-newest-iceberg&amp;catid=11:geography-in-the-news' (length=125)
    public 'text' =&gt; string 'GREENLAND'S NEWEST ICEBERG' (length=26)
    public 'introtext' =&gt; string '&lt;p&gt;A giant chunk of ice calved off the Petermann Glacier on
  
      the northwest side of Greenland this summer. At nearly 100 square miles (260
  
      sq. km) in size, four times the size of Manhattan, th' (length=206)
    public 'date' =&gt; 
      object(JDate)[423]
        public '_date' =&gt; int 1284130800
        public '_offset' =&gt; int 0
        public '_errors' =&gt; 
          array
            empty
  </code></pre>
  
  <p>You can see that $firstArticle->introtext refers to the string:</p>
  
  <p>"<code>&lt;p&gt;</code>A giant chunk of ice calved off the Petermann Glacier on the northwest side of Greenland this summer. At nearly 100 square miles (260 sq. km) in size, four times the size of Manhattan, th"</p>
  
  <p>The <code>&lt;p&gt;</code> tag is a problem for me in this application, however strip_tags absolutely refuses to remove it and I can't figure out why.  I actually gave up on strip_tags and attempted to do a preg_replace instead with the regex /&lt;(.|\n)*?>/ :</p>
  
  <pre><code>preg_replace('/&lt;(.|\n)*?&gt;/', '', $firstArticle-&gt;introtext);
  </code></pre>
  
  <p>But that didn't work either!  How can I strip all HTML tags (matched or not) from this string when I output it?</p>