title: PHP html special characters encode not to entities but Decimal
body: <p>I have trouble finding a solution for the following problem:</p>
  
  <p>I have a lot of special characters on the website that when I run them through htmlentities();</p>
  
  <p>you get all the special characters converted to HTML entities:</p>
  
  <pre><code>£ =&gt; &amp;pound;
  " =&gt; &amp;quot;
  Â =&gt; &amp;Acirc;
  ....
  </code></pre>
  
  <p>But what I actually need is the Decimal version of that encoding:</p>
  
  <pre><code>£ =&gt; &amp;#163;
  " =&gt; &amp;#34;
  &amp;Acirc; of(Â) =&gt; &amp;#192;
  &amp;nbsp; =&gt; &amp;#160;
  </code></pre>
  
  <p>Is there a function that already exists that would solve this issue without doing this manually with a replace?</p>