title: PHP - Remove decoded HTML entities from string
body: <p>I am trying to sanitize a string and have ended up with the following:</p>
  
  <blockquote>
    <p>Characterisation of the arsenic resistance genes in  lt i gt Bacillus
    lt  i gt  sp  UWC isolated from maturing fly ash acid mine drainage
    neutralised solids</p>
  </blockquote>
  
  <p>I am trying to remove the lt, i, gt as those are reduced HTML entities which do not seem to be removed. What would be the best way to approach this or another solution that I could look at?</p>
  
  <p>Here is my current solution for now:</p>
  
  <pre><code>/**
   * @return string
   */
  public function getFormattedTitle()
  {
      $string = preg_replace('/[^A-Za-z0-9\-]/', ' ',  filter_var($this-&gt;getTitle(), FILTER_SANITIZE_STRING));
      return $string;
  }
  </code></pre>
  
  <p>And here is an example input string:</p>
  
  <pre><code>Assessing &lt;i&gt;Clivia&lt;/i&gt; taxonomy using the core DNA barcode regions, &lt;i&gt;matK&lt;/i&gt; and &lt;i&gt;rbcLa&lt;/i&gt;
  </code></pre>
  
  <p>Thanks!</p>