title: htmlentities in PHP but preserving html tags
body: <p>I want to convert all texts in a string into html entities but preserving the HTML tags, for example this:</p>
  
  <pre><code>&lt;p&gt;&lt;font style="color:#FF0000"&gt;Camión español&lt;/font&gt;&lt;/p&gt;
  </code></pre>
  
  <p>should be translated into this:</p>
  
  <pre><code>&lt;p&gt;&lt;font style="color:#FF0000"&gt;Cami&amp;oacute;n espa&amp;ntilde;ol&lt;/font&gt;&lt;/p&gt;
  </code></pre>
  
  <p>any ideas?</p>