title: PHP HTML entities: comparing chars with the html code (acute)
body: <p>How can i make this comparison return true?</p>
  
  <pre><code>$var1="á";
  $var2="&amp;aacute;";
  
  if ($var1==$var2) {
      return true;
  }
  </code></pre>
  
  <p>The funny thing is that i dont know if the html entity is in var1 or in var2, so i need to put the same function in both sides of the comparison.</p>
  
  <p>I tried with html_entity_decode, htmlentities and a combination of both.</p>
  
  <p>Any ideas? </p>
  
  <p>Thanks!</p>