title: How to extract only text from HTML string with PHP?
body: <p>I want to extract only text from a php string.</p>
  
  <p>This php string contains html code like  tags or   etc.</p>
  
  <p>So I only need a simple text from this string. </p>
  
  <p><strong>This is the actual string:</strong></p>
  
  <pre><code>&lt;div class="devblog-index-content battlelog-wordpress"&gt;
  &lt;p&gt;&lt;strong&gt;The celebration of the Recon class in our second &lt;/strong&gt;&lt;a href="http://blogs.battlefield.com/2014/10/bf4-class-week-recon/" target="_blank"&gt;BF4 Class Week&lt;/a&gt;&lt;strong&gt; continues with a sneaky stroll down memory lane. Learn more about how the Recon has changed in appearance, name and weaponry over the years&amp;hellip;&lt;/strong&gt;&lt;/p&gt;
  
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  
  &lt;p style="text-align:center"&gt;&lt;a href="http://eaassets-a.akamaihd.net/battlelog/prod/954660ddbe53df808c23a0ba948e7971/en_US/blog/wp-content/uploads/2014/10/bf4-history-of-recon-1.jpg?v=1412871863.37"&gt;&lt;img alt="bf4-history-of-recon-1" class="aligncenter" src="http://eaassets-a.akamaihd.net/battlelog/prod/954660ddbe53df808c23a0ba948e7971/en_US/blog/wp-content/uploads/2014/10/bf4-history-of-recon-1.jpg?v=1412871863.37" style="width:619px" /&gt;&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p><strong>I want to show this from the string:</strong></p>
  
  <pre><code>The celebration of the Recon class in our second BF4 Class Week continues with a sneaky stroll down memory lane. Learn more about how the Recon has changed in appearance, name and weaponry over the years…
  </code></pre>
  
  <p>Actually this text will be placed in meta description tag so I don't need any HTML in meta tag.
  How can I perform this? Any ideas and thoughts about this technique ?</p>