title: Poser with cutting string in PHP
body: <p>I have this <code>string</code> which contains HTML code:</p>
  
  <pre><code>....
  ....
  &lt;span class="sss"&gt;some word&lt;/span&gt;
  ....
  ....
  </code></pre>
  
  <p>How can I take only text from this line, in my case <code>some word</code>. I tried to do this using the <code>substr</code> and <code>strpos</code> functions. But, I have some problem. </p>
  
  <ul>
  <li>Closing <code>&lt;/span&gt;</code> tags were encountered in the string before </li>
  <li>I do not know how long the text will be (in my case <code>some word</code>)</li>
  </ul>
  
  <p>P.S That text not only non-html portion of the string value</p>